more future sets info (#143)

Add future sets to setinfo with any available information completed and the rest commented.

noRSS enabled for each, spoiler.rss is current-set-only. As MTGS spoiler.rss gets updated, noRSS should be removed/falsed for the current set. 

* updated with basic info for future sets

source: http://www.mtgsalvation.com/forums/magic-fundamentals/the-rumor-mill/673776-schedule-of-upcoming-releases-and-spoiler-seasons

* added mythicCode to optional keys

* Update set_info.yml

http://magic.wizards.com/en/products/iconic-masters

http://markrosewater.tumblr.com/post/163779974563/wait-so-the-unstable-set-code-is-ust-i-thought

http://magic.wizards.com/en/products/rivals-ixalan

http://magic.wizards.com/en/products/masters-25

http://magic.wizards.com/en/products/dominaria

http://magic.wizards.com/en/products/core-2019

* Update set_info.yml

* Update set_info.yml

* Update mtgs_scraper.py

* Update mtgs_scraper.py

* Update set_info.yml

* more documentation

* Only print set stats for sets with cards

* Move set has cards check for debug print

* Print line if set has no cards
This commit is contained in:
tooomm 2017-09-07 17:32:42 +02:00 committed by Dave
parent 78776169ab
commit 0fd2ead70d
3 changed files with 84 additions and 8 deletions

View File

@ -264,6 +264,8 @@ def scrape_mtgs_images(url='http://www.mtgsalvation.com/spoilers/183-hour-of-dev
def list_mtgs_gallery(url=''):
if url == '':
return ''
page = requests.get(url)
tree = html.fromstring(page.content)
cards = []

View File

@ -15,6 +15,11 @@
# mtgsurl: "http://url_to_mtgsalvation.com/spoilers/page
# mtgscardpath "http://url_to_mtgsalvation.com/cards/setpage/"
# fullSpoil: false
# noRSS: true #don't check MTGS spoiler newsfeed spoiler.rss for this set
# noBooster:
# mythicCode:
# mythicOnly:
# scryfallOnly:
# masterpieces:
#
# Masterpieces contain code, name, releaseDate as above
@ -30,7 +35,7 @@
# block: "Amonkhet"
# size: 199
# releaseDate: "2017-07-14"
# type: "expansion"
# type: "expansion" #can be "expansion", "core", "commander", "masters" - for full list see http://mtgjson.com/documentation.html#sets
# mtgsurl: "http://www.mtgsalvation.com/spoilers/183-hour-of-devastation" #looks like http://www.mtgsalvation.com/spoilers/183 automatically redirects to same page
# mtgscardpath: "http://www.mtgsalvation.com/cards/hour-of-devastation/" #important: don't forget the trailing slash "/" at the end of the link!
# fullSpoil: false
@ -63,3 +68,69 @@ fullSpoil: false
# additionalCardNames: []
# mtgsurl: "?"
# mtgscardpath: "?"
---
code: "IMA"
name: "Iconic Masters"
#block: "?"
#size: ?
releaseDate: "2017-11-17"
type: "masters"
mtgsurl: ""
#mtgscardpath: "?"
fullSpoil: false
noRSS: true
---
code: "UST"
name: "Unstable"
#block: "?"
#size: ?
releaseDate: "2017-12-08"
type: "un"
mtgsurl: ""
#mtgscardpath: "?"
fullSpoil: false
noRSS: true
---
code: "RIX"
name: "Rivals of Ixalan"
block: "Ixalan"
#size: ?
releaseDate: "2018-01-19"
type: "expansion"
mtgsurl: ""
#mtgscardpath: "?"
fullSpoil: false
noRSS: true
---
code: "A25"
name: "Masters 25"
#block: "?"
#size: ?
releaseDate: "2018-03-16"
type: "masters"
mtgsurl: ""
#mtgscardpath: "?"
fullSpoil: false
noRSS: true
---
code: "DOM"
name: "Dominaria"
#block: "?"
#size: ?
releaseDate: "2018-04-27"
type: "expansion"
mtgsurl: ""
#mtgscardpath: "?"
fullSpoil: false
noRSS: true
---
code: "M19"
name: "Core 2019"
#block: "?"
#size: ?
releaseDate: "2018-07-20"
type: "core"
mtgsurl: ""
#mtgscardpath: "?"
fullSpoil: false
noRSS: true

View File

@ -484,12 +484,15 @@ def write_xml(mtgjson, code, name, releaseDate):
cardsxml.write("</cards>\n</cockatrice_carddatabase>")
print 'XML Stats for ' + code
print 'Total cards: ' + str(count)
if dfccount > 0:
print 'DFC: ' + str(dfccount)
print 'Newest: ' + str(newest)
print 'Runtime: ' + str(datetime.datetime.today().strftime('%H:%M')) + ' (UTC) on ' + str(datetime.date.today())
if count > 0:
print 'XML Stats for ' + code
print 'Total cards: ' + str(count)
if dfccount > 0:
print 'DFC: ' + str(dfccount)
print 'Newest: ' + str(newest)
print 'Runtime: ' + str(datetime.datetime.today().strftime('%H:%M')) + ' (UTC) on ' + str(datetime.date.today())
else:
print 'Set ' + code + ' has no spoiled cards.'
def write_combined_xml(mtgjson, setinfos):
@ -631,7 +634,7 @@ def write_combined_xml(mtgjson, setinfos):
cardsxml.write("</card>\n")
cardsxml.write("</cards>\n</cockatrice_carddatabase>")
print 'XML COMBINED STATS'
print 'Total cards: ' + str(count)
if dfccount > 0: