Re: Connecting Google News

2017-07-16 Thread dieter
Javier Bezos writes: > Google News used to fail with the high level functions provided by > httplib and the like. However, I found this piece of code somewhere: > ... > A few days ago, Google News has been revamped and it doesn't work any > more (2.6/Win7, 2.7/OSX and, with minimal changes, 3.6/Wi

Re: Connecting Google News

2017-07-16 Thread Skip Montanaro
Peter> Most of the actual content seems to be buried in javascript though. Peeking at it, almost all of the useful content appears to be data. It doesn't seem like snipping it out and interpreting it as JSON would be terribly difficult. Perhaps no JS engine required. Skip -- https://mail.python.

Re: Connecting Google News

2017-07-16 Thread Javier Bezos
Peter, http.request("GET","/news/headlines?ned=es_mx&hl=es" , Thank you. It works, too. Javier -- https://mail.python.org/mailman/listinfo/python-list

Re: Connecting Google News

2017-07-16 Thread Javier Bezos
Chris, (Also, please upgrade your Windows box to run Python 2.7.) It's not /my/ Windows box. I'm allowed to run my script, that's all. My Windows box is actually that with 3.6. http = httplib.HTTPSConnection('news.google.com') http.request("GET","/news?ned=es_MX" , ('Loc

Re: Connecting Google News

2017-07-16 Thread Chris Warrick
On 16 July 2017 at 11:26, Javier Bezos wrote: > Google News used to fail with the high level functions provided by httplib > and the like. However, I found this piece of code somewhere: > > def gopen(): > http = httplib.HTTPSConnection('news.google.com') > http.request("GET","/news

Re: Connecting Google News

2017-07-16 Thread Peter Otten
Javier Bezos wrote: > Google News used to fail with the high level functions provided by httplib > and the like. However, I found this piece of code somewhere: > > def gopen(): >http = httplib.HTTPSConnection('news.google.com') >http.request("GET","/news?ned=es_MX" , When yo

Connecting Google News

2017-07-16 Thread Javier Bezos
Google News used to fail with the high level functions provided by httplib and the like. However, I found this piece of code somewhere: def gopen(): http = httplib.HTTPSConnection('news.google.com') http.request("GET","/news?ned=es_MX" , headers =