Web scraping urlopen in python

后端 未结 3 740
小蘑菇
小蘑菇 2021-01-06 07:09

I am trying to get the data from this website: http://www.boursorama.com/includes/cours/last_transactions.phtml?symbole=1xEURUS

It seems like urlopen don\'t get the

3条回答
  •  情深已故
    2021-01-06 07:14

    I have tested your URL with the httplib2 and on the terminal with curl. Both work fine:

    URL = "http://www.boursorama.com/includes/cours/last_transactions.phtml?symbole=1xEURUS"
    h = httplib2.Http()
    resp, content = h.request(URL, "GET")
    print(content)
    

    So to me, either there is a bug in urllib.request or there is really weird client-server interaction happening.

提交回复
热议问题