0

I had a problem while attempting to get text from a url using Python requests module.

After managing to find the url of the bibtex of academic articles, I have problems to get the text containing the bibtex.

As an example, through some Python lines of code I obtain this link, which contain the following bibtex:

@article{milgrom1994monotone, title={Monotone comparative statics}, author={Milgrom, Paul and Shannon, Chris}, journal={Econometrica: Journal of the Econometric Society}, pages={157--180}, year={1994}, publisher={JSTOR}}

It don't manage to extract the text using the code below:

`bibtex = requests.get(googlescholar + urlbib).text`

where google scholar is a string containing "https://scholar.google.com.br" and url is "/scholar.bib?q=info:46dohauatq8J:scholar.google.com/&output=citation&hl=en&ct=citation&cd=0".

I feel like I'm missing something, because when I copy and paste the full url on the Google Chrome it works normally; i.e., it opens the page instead of issuing an error message.

DS81
  • 1
  • 1
  • 1
    what error does it give u? – Simone Zandara Dec 06 '15 at 16:40
  • Actually, it doesn't issue an error message. It just doesn't get the bibtex. Instead, the text that is obtain is the following: – DS81 Dec 06 '15 at 17:26
  • Error 403 (Forbidden)!! That’s an error. Your client does not have permission to get URL /scholar.bib?q=info:46dohauatq8J:scholar.google.com/&output=citation&hl=en&ct=citation&cd=0 from this server. Please see Google's Terms of Service posted at http://www.google.com/terms_of_service.html That’s all we know. – DS81 Dec 06 '15 at 17:31
  • I am afraid google is blocking your request – Simone Zandara Dec 06 '15 at 17:41

0 Answers0