ourresearch / total-impact-core

An api and backend code to gather the impacts of diverse scholarly products online.
http://impactstory.org
Other
55 stars 7 forks source link

handle cookies on crossref redirects #109

Closed jasonpriem closed 11 years ago

jasonpriem commented 11 years ago

Right now some CrossRef DOIs resolve to a page that requires cookies be enabled. Since enabled (Taylor & Francis and NEJM journals, it seems, among others) and re.

So, it looks like we are getting URLs from CrossRef that are wrong: instead of being the URL for the paper, it's the URL for the "you must have cookies enabled" page. @mfenner has found that this works as a workaround:

curl -LIc cookieFile "http://dx.doi.org/10.1080/10629360600569196"

So, I think we need to modify our call to CrossRef so that Requests enables cookies.

mfenner commented 11 years ago

In the PLOS ALM app I have implemented this with a HTTP library that follows redirects and accepts cookies in the process: Faraday and Faraday Middleware. I'm sure there are similar libraries for Python.

hpiwowar commented 11 years ago

Turns out this wasn't broken in our code: we handle it correctly already.