mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Fix for Avacyn's Pilgrim image download.
This commit is contained in:
parent
c155a90a7d
commit
f1bf37bbd0
4 changed files with 2 additions and 6 deletions
|
@ -49,7 +49,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
||||||
Document doc = Jsoup.connect("http://www.wizards.com/magic/tcg/article.aspx?x=mtg/tcg/" + (String) setsAliases.get(cardSet)).get();
|
Document doc = Jsoup.connect("http://www.wizards.com/magic/tcg/article.aspx?x=mtg/tcg/" + (String) setsAliases.get(cardSet)).get();
|
||||||
Elements cardsImages = doc.select("img[height$=370]");
|
Elements cardsImages = doc.select("img[height$=370]");
|
||||||
for (int i = 0; i < cardsImages.size(); i++) {
|
for (int i = 0; i < cardsImages.size(); i++) {
|
||||||
String cardName = cardsImages.get(i).attr("title").replace("\u00C6", "AE");
|
String cardName = cardsImages.get(i).attr("title").replace("\u00C6", "AE").replace("’", "'");
|
||||||
if (cardName != null && !cardName.isEmpty()) {
|
if (cardName != null && !cardName.isEmpty()) {
|
||||||
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
if (cardName.equals("Forest") || cardName.equals("Swamp") || cardName.equals("Mountain") || cardName.equals("Island") || cardName.equals("Plains")) {
|
||||||
int landNumber = 1;
|
int landNumber = 1;
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
package mage.view;
|
package mage.view;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -31,13 +31,10 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.TriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.MorbidCondition;
|
import mage.abilities.condition.common.MorbidCondition;
|
||||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.mana.BlackManaAbility;
|
|
||||||
import mage.abilities.mana.RedManaAbility;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class CardParser extends Thread {
|
||||||
List<String> flavorText = new ArrayList<String>();
|
List<String> flavorText = new ArrayList<String>();
|
||||||
if (!select.isEmpty()) {
|
if (!select.isEmpty()) {
|
||||||
for (Element element : select) {
|
for (Element element : select) {
|
||||||
flavorText.add(element.html().trim().replace(""", "\""));
|
flavorText.add(element.html().trim().replace(""", "\"").replace("<i>", "").replace("</i>", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
card.setFlavorText(flavorText);
|
card.setFlavorText(flavorText);
|
||||||
|
|
Loading…
Reference in a new issue