-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceeded maxRedirects with nytimes.com links #76
Comments
Ah OK, now I remember what the hack for nytimes.com is: keep the cookies during the redirects. Not sure if setting this option to true is something that has implications for the general use case, so I leave it here FYI: https://github.com/request/request#examples request( {jar: true, url: url}, (err, resp, body) => { console.log(body) }); |
+1 for this, having the same issue here |
+1 had the same issue for urls of washingtonpost.com. Fixed by setting |
request( {jar: true, url: url}, (err, resp, body) => { console.log(body) }); |
Hi guys I was giving a try to Cheerio trying to scrap some info from: http://www.bna.com.ar/Personas My Code: request({jar:true, url:'http://www.bna.com.ar/Personas'},(err, res, html)=> { But is giving me the following error. PS C:\Users\Federico\source\repos\Ws> node index I try adding jar:true but is not working any clue? |
解决了我的问题 jar:true 点赞 |
안녕, 영어를 쓰십시오 |
(Just leaving this here, will investigate a bit later)
Given a New York Times URL such as this:
http://www.nytimes.com/2016/07/12/technology/pokemon-go-brings-augmented-reality-to-a-mass-audience.html
The request will fail with this error:
Note that nytimes.com has some convoluted server configuration and returns a HTTP code of 303.
...you'll get the same redirection behavior with cURL:
More heavy HTTP clients, such as whatever wget uses by default, can deal with this, as can libraries such as Python's Requests. I'm new to Node so I'm not sure what the best-practices route is.
The text was updated successfully, but these errors were encountered: