Connecting Google News

Javier Bezos jbezos.dummy at gmail.com
Sun Jul 16 06:55:45 EDT 2017


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" ,

>>       ('Location', 'https://news.google.com/news/?ned=es_mx&hl=es'),
...

> See that Location header? The web server wants to redirect you
> somewhere. Your low-level HTTP library does not handle redirects
> automatically, so you’d need to take care of that yourself.

I didn't notice the bar just before ?ned ! I don't know how many
times I've compared the URLs without realizing it was added. Silly
me!

Thank you
Javier





More information about the Python-list mailing list