Open robrady opened 5 months ago
I made my own selenium scraper using very similar methods to the above, but I am recently getting a lot of "Oops something went wrong, please try again in a bit" errors with my scraper on terms that should be working (as per a manual GST search). Is anyone facing a similar road block? Any workarounds? I am trying to scrape a number of terms for varying locations and time scales and do end up getting the 200 rate-limit error on a daily basis when I hit some query threshold, but this seems to be separate.
I made my own selenium scraper using very similar methods to the above, but I am recently getting a lot of "Oops something went wrong, please try again in a bit" errors with my scraper on terms that should be working (as per a manual GST search). Is anyone facing a similar road block? Any workarounds? I am trying to scrape a number of terms for varying locations and time scales and do end up getting the 200 rate-limit error on a daily basis when I hit some query threshold, but this seems to be separate.
Use tailscale and connect your mobile as exit node. If you hit 200 turn on and off Aeroplane mode so ip will be changed that will reduce the 200 error and you will get new ip. But it will consume lot of load on mobile data. If you have wifi network then turn on and off router you will get new ip since Residential ip's are dynamic in nature. You will get the good results
When use --headless option, Google still detects userType as USER_TYPE_SCRAPPER and didn't get any results. Just a message: Oops! Something went wrong. Also all requests responded with 429 status code, ex multiline and etc. But without --headless when browser are opening it works completly, and file are downloading properly. Do you know any options, to solve this moment?
These settings work perfectly for me headless:
from fake_useragent import UserAgent
chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--no-sandbox") chrome_options.add_argument("--headless") chrome_options.add_argument("--disable-gpu") chrome_options.add_argument("--disable-dev-shm-usage") chrome_options.add_argument("--window-size=640,400") ua = UserAgent() user_agent = ua.random chrome_options.add_argument(f'--user-agent={user_agent}')
And
driver.implicitly_wait(5)
The magic is done by: UserAgent
Thanks for sharing your selenium code.
In case anyone is interested, I've adapted it further and made some changes to the interface.
Adapted library is:
thanks its working with some modifications use cases can be satisified !! upvoted
Originally posted by @dhruv-1010 in https://github.com/GeneralMills/pytrends/issues/602#issuecomment-1834101412