use urlencode to instead of sed to encode card name
parent
80e2c07b67
commit
33e1d8fb45
4
Makefile
4
Makefile
|
@ -440,8 +440,8 @@ verify_mana_cost_order: cards/mtg_mana_costs cards/mag_mana_costs
|
|||
if grep token= $^; then \
|
||||
echo "ERROR: Not applicable to tokens"; \
|
||||
else \
|
||||
name=$$(grep name= $^ | sed 's/name=//' | sed 's/ /%20/g');\
|
||||
value=$$(curl -sL http://gatherer.wizards.com/pages/card/details.aspx?name=$$name | grep "textRatingValue" | grep -o "[0-9]\.[^<]*" | head -1);\
|
||||
name=$$(grep name= $^ | sed 's/name=//');\
|
||||
value=$$(curl -sLG http://gatherer.wizards.com/pages/card/details.aspx --data-urlencode "name=$$name" | grep "textRatingValue" | grep -o "[0-9]\.[^<]*" | head -1);\
|
||||
sed -i "s/value=.*/value=$$value/" $^;\
|
||||
fi \
|
||||
|
||||
|
|
Loading…
Reference in New Issue