2e0byo / YADC

Yet Another DVSA (Test) Checker
MIT License
25 stars 15 forks source link

Can't connect to internet #13

Closed MPanek6 closed 2 years ago

MPanek6 commented 2 years ago

Hi, having difficulty getting this setup even after reading through the FAQ section on this. I have my scraper setup as: image This opens up Tor (stays on home page) and chrome which displays the can't connect to internet page

Alternatively using chromedriver (which is in the same folder as YADC.py / main) gives the following however chrome never opens up and nothing happens (tor stays on home page): image image

Any help would be appreciated as DVSA decided to cancel my test 3hrs before it due today :)

2e0byo commented 2 years ago

This opens up Tor [snip]

That doesn't sound like you're running tor. It sounds like you're running the Tor browser. YADC needs a standalone tor it can control. You can try using scripts/download_tor.py to download it for you, or download it yourself using the url in that file.

The fact that chrome then loads is good. The fact that it fails is down to no tor proxy being available.

Alternatively [snip]

This setup is just incorrect---the path should be to chrome, not chromedriver (YADC starts chrome itself). However we know this isn't a chromedriver issue, so this is a blind alley.

In general btw copy-paste code, don't take screenshots. Github has fenced markdown blocks, so you can get syntax highlighting.

DVSA decided to cancel my test 3hrs [snip]

Rotten luck on that. Also goodness, this testing backlog has been going on a long time...

MPanek6 commented 2 years ago

Hi, Downloaded tor zip from the link in the script, extracted, and pointed to it as follows, is this correct?

TorBrowser(
        buster=Path(r"C:\Users\mikey\Downloads\buster"),
        chrome=Path(r"C:\Program Files\Google\Chrome\Application\chrome.exe"),
        tor=Path(r"C:\Users\mikey\Downloads\tor\Tor\tor.exe"),  # probably not needed on *nix
    )

It seems to work but eventually runs into an issue with imperva blocking either before or after queuing. Also is my buster setup correct?

Cheers :)

2e0byo commented 2 years ago

Imperva used to catch YADC ever so often. It will recover from the catches. If it starts catching it too often to be useable, further work might be needed. I don't really develop it any more, but one step would be to try using undetectable_chromedriver, although this would require intercepting undetectable_chromedriver between its launch of the chrome process and its taking command (we need to pause here to allow an anti-bot js to run, otherwise we get blocked).

So long as you're getting past the queue sometimes everything is good.

I have no idea if your buster path is correct or what's in it, but other than that; yes---you just pass it the path to buster and it will (usually) do the rest.

Glad you got it running!

MPanek6 commented 2 years ago

Sorry i should of specified, the path i specified for buster is just the folder of where i extracted the buster.zip file

2e0byo commented 2 years ago

That should be fine, then. You'll know if buster is installed---you'll see it solving captchas (sometimes---it won't always work).