Web Scraper avatar

Web Scraper

Try for free

No credit card required

View all Actors
Web Scraper

Web Scraper

apify/web-scraper
Try for free

No credit card required

Crawls arbitrary websites using the Chrome browser and extracts data from pages using JavaScript code. The Actor supports both recursive crawling and lists of URLs and automatically manages concurrency for maximum performance. This is Apify's basic tool for web crawling and scraping.

Do you want to learn more about this Actor?

Get a demo
RS

The main function of the Actor threw an exception.

Closed

ritzy_sample opened this issue
a month ago

Hi,

I don't know what is causing this issue as I am quite new to scraping.

The result I am getting is this: ERROR Compilation of pageFunction failed.

Appreciate any help

jindrich.bar avatar

Hello, and thank you for your interest in this Actor!

The logs of your Actor say it all. Under the ERROR Compilation of pageFunction failed. line, the Actor prints the exact error - which is Unexpected identifier: pageHtml in your case. On the Input tab, the pageFunction editor also checks for syntax errors - you can see that you've missed a comma after the second-last line (see the attached screenshot).

I tried adding that one comma and the Actor worked as expected, returning two results.

I'll close this issue now, but feel free to ask additional questions if you have any. Cheers!

Developer
Maintained by Apify
Actor metrics
  • 2.7k monthly users
  • 167 stars
  • 99.9% runs succeeded
  • 6.9 days response time
  • Created in Mar 2019
  • Modified about 1 month ago