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

Can't understan this #67

Open Ciao121 opened 7 years ago

Ciao121 commented 7 years ago

Using the first example here: http://nrabinowitz.github.io/pjscrape/

pjs.addSuite({ // url to scrape url: 'http://en.wikipedia.org/wiki/List_of_towns_in_Vermont', // selector to look for scraper: '#sortable_table_id_0 tr td:nth-child(2)' }); // Output: ["Addison","Albany","Alburgh", ...]

If I launch ita as is I get suites starting. But if I only replace the url whit anything else (e.g. https://en.wikipedia.org/wiki/List_of_cities_and_towns_in_Utah ) I get

`RangeError: Maximum call stack size exceeded.

undefined:0 in injectJs phantomjs://code/pjscrape.js:886 :0 in forEach RangeError: Maximum call stack size exceeded.

undefined:0 in injectJs phantomjs://code/pjscrape.js:886 :0 in forEach RangeError: Maximum call stack size exceeded.

phantomjs://code/pjscrape.js:894 in global code :0 in injectJs phantomjs://code/pjscrape.js:886 :0 in forEach RangeError: Maximum call stack size exceeded.

undefined:0 in injectJs phantomjs://code/pjscrape.js:886 :0 in forEach FATAL ERROR: No suites configured ` Notingh else changed...