![]() |
|
[Java] "Async script loading error" in phantomjs - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] "Async script loading error" in phantomjs (/showthread.php?tid=5797602) |
"Async script loading error" in phantomjs - milknpepper - Feb 10, 2018 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! RE: "Async script loading error" in phantomjs - V3t3r4n - Feb 10, 2018 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. RE: "Async script loading error" in phantomjs - milknpepper - Feb 10, 2018 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 RE: "Async script loading error" in phantomjs - V3t3r4n - Feb 10, 2018 (Feb 10, 2018 05:00 AM)milknpepper Wrote: After doing tests, I found out that it has nothing to do with the PhantomJS useragent. 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 :) |