CottageLabs / idfind

An identifier identifier
1 stars 0 forks source link

service URL-s: allow POST method #21

Open emanuil-tolev opened 12 years ago

emanuil-tolev commented 12 years ago

Right now users can specify service URL prefix (e.g. http://dx.doi.org/) and a suffix, if one is necessary. Quite a few websites support searching with POST though (i.e. web forms), but you'd have to know a lot more than the URL - e.g. name of elements of the POST data, perhaps even name of the submit button.

Still an idea to implement, if deemed appropriate.

Code affected: /submit to allow specifying the stuff, and then the checks in Identificator._check_service (identifier.py) to actually use the stuff we recorded.

emanuil-tolev commented 12 years ago

Actually, thinking about it, POST web forms are made for people, not machines, so in order to be able to tell whether the lookup was successful or not you'd have to scrape the resulting web page (because the HTTP header when you submit a web form is usually just 200 Success, since there is a page there).

I suppose we should only use lookup interfaces intended for machines at this stage. I'll leave this open for discussion though.