PennyDreadfulMTG/LegalityListCreator

getCardNamesAndPrices gets paper prices too

Closed this issue · 2 comments

After inspecting http://mtggoldfish.com/index/(setAbbr)#online, I noticed that both the paper and online tables are present in the html. The paper table is actually hidden with in-line CSS, which they use to switch between the two without a page refresh. In the unlikely event that a paper card's price dips to 0.01, it could erroneously show up in the list.

paperproof

Looked again, and this time I came up with a simple solution. On the same line of html that this method grabs the card name, there is a link to the price page of the card in question, which either ends in #paper or #online. If this makes sense to you, change MakeAllCardsList.java:106 as follows

if (str.length() > 17 && str.substring(0, 17).equals("<td class='card'>") && str.indexOf("#online\">") > -1){ //Looks for a marker line

PR submitted #5