davidchambers / tutor

JavaScript interface for the Gatherer card database
https://gatherer.wizards.com/
Do What The F*ck You Want To Public License
149 stars 18 forks source link

Gatherer Card Pages contain their own urls #8

Closed nicknovitski closed 12 years ago

nicknovitski commented 12 years ago
$ curl http://gatherer.wizards.com/Pages/Card/Details.aspx\?name\=Demonic%20Tutor | tutorname.html
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 40059  100 40059    0     0   133k      0 --:--:-- --:--:-- --:--:--  163k
$ curl http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=202628
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 40059  100 40059    0     0   200k      0 --:--:-- --:--:-- --:--:--  294k 
$ diff tutorgid.html tutorname.html 
....
27c27
<     <form name="aspnetForm" method="post" action="Details.aspx?multiverseid=202628" id="aspnetForm">

---
>     <form name="aspnetForm" method="post" action="Details.aspx?name=Demonic+Tutor" id="aspnetForm">
....

This means that the parser can always build those urls without them being passed explicitly, even when searching by name. Further, the parser can tell whether it's looking at a page linked to a particular GID, without that being passed explicitly, so there's no need for Parser.card to have an options parameter.

davidchambers commented 12 years ago

Very nice, Nick. Very nice indeed. Shall I go ahead and pull this in?

nicknovitski commented 12 years ago

Hold off, if you could. I'll use test instead of search, and there's a similar issue i'm going to post about with parsing set pages.

On Apr 19, 2012, at 13:39, David Chambers reply@reply.github.com wrote:

Very nice, Nick. Very nice indeed. Shall I go ahead and pull this in?


Reply to this email directly or view it on GitHub: https://github.com/davidchambers/tutor/issues/8#issuecomment-5231523