ERROR--halting the scraping session because the maximum number of scripts allowed on the stack was reached.
Dear Fellow Scrapers,
I've been having trouble getting around the following error: "ERROR--halting the scraping session because the maximum number of scripts allowed on the stack was reached. Current number on the stack is: 50".
There are a couple blog posts that try to resolve this error, unfortunately I'm not a Java programmer and haven't had a luck implementing the described solutions.
I'm trying to scrape a site that has about 20 results per page and probably 1000 pages. My scrape is set up to scrape the results on each page and then iterate through the subsequent pages. I receive the above error after just scraping only 50 results (not the detail pages).
I'm surprised to receive this error because I thought that this tool was designed to loop through results pages and scrape data from each individual detail page. Am I not using this tool properly?
Any help on getting past this error would be greatly appreciated.
Thanks,
Bryan
Error Solution
Jason,
thanks for the links. As I mentioned, I have veiwed these already and found it difficult to impliment the solutions, which are discussed at a high level. Can more specfic detail be provided for a non-Java programmer?
Having exact steps would be helpful. For instance, in the first post talking about setting the number of sessions, where would I put these lines of code?
session.getNumScriptsOnStack()
session.setMaxScriptsOnStack( 50 )
Do they go into the scrape initialization script?
Thanks,
Bryan
Here is a post that explains
Here is a post that explains the error:
http://blog.screen-scraper.com/2010/04/15/to-iterate-is-human-to-recurse-divine/
Here is a post with the general idea on how to get around it:
http://blog.screen-scraper.com/2008/07/07/large-data/