dentarg / hubot-url-title

:crocodile: Returns the title when a link is posted
https://www.npmjs.com/package/hubot-url-title
4 stars 11 forks source link

Stacktrace when attempting to load NYTimes article #21

Closed thomasrussellmurphy closed 8 years ago

thomasrussellmurphy commented 8 years ago

Test case http://www.nytimes.com/2016/07/31/us/politics/us-wrestles-with-how-to-fight-back-against-cyberattacks.html

Trace includes

 (node) warning: possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit.

and more. The version I'm using over at https://github.com/hacsoc/lulu/blob/master/scripts/web.coffee replies with "Error 303".

pchaigno commented 8 years ago

Hubot-url-title fails because of the high number of redirects (limited to 10 by default). The warning message you mention is related but it's not the cause.

I'm trying to see why Hubot faces so many redirects when a web browser doesn't seem to have any.

thomasrussellmurphy commented 8 years ago

Do you manage cookies? I believe NYT requires them for articles.

pchaigno commented 8 years ago

We didn't. I just pushed a fix to the fix-redirects-cookies branch.