nrabinowitz / pjscrape

A web-scraping framework written in Javascript, using PhantomJS and jQuery
http://nrabinowitz.github.io/pjscrape/
MIT License
997 stars 159 forks source link

Using timeoutInterval causes PhantomJS to stop accepting cookies #36

Closed Botono closed 11 years ago

Botono commented 11 years ago

If a value for timeoutInterval is provided, PhantomJS will eventually stop utilizing cookies. phantom.addCookie() will return false (as will page.addCookie()).

The larger the timeoutInterval, the fewer suites can be run before cookie functionality fails.

With a timeoutInterval of 3,000, cookies fail around suite 22. With an interval of 10,000 they fail at around 7 suites.

I believe the issue stems from the number of times page.evaluate() is called, but I'm note sure.

Botono commented 11 years ago

Closing this because I'm not sure this is the core issue, and I was probably misusing the parameter anyway.