Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

"Async script loading error" in phantomjs

I have a phantomjs script that parses data from a website.
Worked well 2 weeks before, now doens't work anymore. There has been no changes to the script 100%.

Seems something changed on the website, resulting in the error when executed:

Current page (hidden url)
Now loading a new page...
Async script loading error: (hidden url)
Navigated to (hidden url)
Finished loading page, title 'Access Denied'
Error: Illegal page state

Does anyone know what this error can the cause of and which direction to troubleshoot?

Thanks!
Hard to tell with only the info you provided, but I'm guessing they got some sort of anti-scraping feature on their website that automatically detects you and gives you an Access Denied when trying to access their page, making it impossible for you to visit the website with your script.

The reason as to why they did this could be a plethora of reasons. You'd have to give us more info about this site.
After doing tests, I found out that it has nothing to do with the PhantomJS useragent.
What can be possible causes?


The script its not able to load is a jquery.js script. Is it possible that perhaps PhantomJS isn't able to load it because it doesn't have some plugin?


The name of the file its not able to load (which is causing the failure) is: jquery.cookie.js
(Feb 10, 2018 05:00 AM)milknpepper Wrote:  After doing tests, I found out that it has nothing to do with the PhantomJS useragent.
What can be possible causes?


The script its not able to load is a jquery.js script. Is it possible that perhaps PhantomJS isn't able to load it because it doesn't have some plugin?


The name of the file its not able to load (which is causing the failure) is: jquery.cookie.js

I'm not that versed on how PhantomJS works (I only use it to run an Highcharts Export Server), so I can't tell you how to proceed here.

This is why I usually just use pure php + javascript for my scrapping purposes if I really need them. You have to run it on your own browser, which can be a drag sometimes, but you can see it working and it never fails me :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by ahmet1257Mar 10, 2022 09:51 AM 2 228 Mar 10, 2022 09:51 AM
Last Post: benio2
[C#] by LookdadonMar 7, 2022 01:38 PM 7 266 Mar 7, 2022 01:38 PM
Last Post: Lookdadon
[C#] by Sanchez SalesJun 18, 2020 08:11 AM 0 165 Jun 18, 2020 08:11 AM
Last Post: Sanchez Sales