Closed AsaAyers closed 11 years ago
This doesn't answer your specific question, but you can, given a URL-escaped name or gatherer id, construct a query that will give you that image.
In this forum thread I put out some sample URLs:
http://riptidelab.com/forum/threads/m14-is-on-gatherer-get-it-updated-to-ct.169/
In case it helps
On Fri, Sep 13, 2013 at 9:42 PM, Asa Ayers notifications@github.com wrote:
It looks like #24 added
image_url
, but now I don't get animage_url
on atutor.card
request. From the example in the README I can see thattutor.set
containsimage_url
s on the cards, but it also doesn't seem to contain the card IDs, so I can't even make both requests and match them up.Was this intentionally removed for some reason?
Reply to this email directly or view it on GitHub: https://github.com/davidchambers/tutor/issues/73
Was this intentionally removed [from tutor.card responses] for some reason?
Not that I recall. The attribute should be reinstated.
I'll take a quick peek here
this is going to be a very brittle scrape I think
<tr>
<td class="leftCol" align="center">
<img src="../../Handlers/Image.ashx?multiverseid=182290&type=card" id="ctl00_ctl00_ctl00_MainContent_SubContent_SubContent_cardImage" alt="Akroma, Angel of Wrath Avatar" style="border:none;" />
<br class='clear' />
<div class="variations">
</div>
<div class="rotate">
<a href="javascript:void(0)" rel="lightbox" onclick="return RotateCardImage(event, this, true);">
</a>
</div>
</td>
</tr>
edit: this is even after looking at the original thread
I'd like to suggest constructing the url like we are in the set:
gatherer_url: "#{gatherer.origin}/Pages/Card/Details.aspx?#{param}"
image_url: "#{gatherer.origin}/Handlers/Image.ashx?#{param}&type=card"
so, with my current implementation for a card searched by name:
image_url: 'http://gatherer.wizards.com/Handlers/Image.ashx?type=card&#name=wild%20nacatl',
gatherer_url: 'http://gatherer.wizards.com/Pages/Card/Details.aspx?name=wild%20nacatl'
and the same card by id
image_url: 'http://gatherer.wizards.com/Handlers/Image.ashx?type=card&multiverseid=249401',
gatherer_url: 'http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=249401'
It seems reasonable for the value of image_url
to depend on whether the card is requested by name or by id.
It looks like #24 added
image_url
, but now I don't get animage_url
on atutor.card
request. From the example in the README I can see thattutor.set
containsimage_url
s on the cards, but it also doesn't seem to contain the card IDs, so I can't even make both requests and match them up.Was this intentionally removed for some reason?