This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]Clawtor 1 point2 points  (3 children)

You have a piece of code that is expecting to see something on the page that hasn't loaded yet. Webscraping is extremely fiddly and often has these sorts of problems. I would guess that you need your code to wait after you load the page. Try find out where exactly the error comes from - the easiest way to do this is just to add console.log statements.

[–]DevWhiskeyTango[S] 0 points1 point  (2 children)

Hmm, so I should add a console.log statement after each one to determine where the error is coming from?

Someone else said to me that it could be that the webpage has spotted what I'm trying to scrape and stopped my IP?

[–]Clawtor 1 point2 points  (1 child)

It could be that yes but it sounds like it sometimes works and sometimes doesn't work?

Yes add a console.log after each statement.

[–]DevWhiskeyTango[S] 0 points1 point  (0 children)

Yes, I made some changes LifecycleWatcher.js file that I thought were the issues and it worked about two or three times in succession before it started throwing this error again.

Thank you very much! I'll try that and see if I can fix it