Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromedriver needs to be manually updated frequently #2

Closed
bji219 opened this issue Nov 29, 2021 · 2 comments
Closed

Chromedriver needs to be manually updated frequently #2

bji219 opened this issue Nov 29, 2021 · 2 comments

Comments

@bji219
Copy link
Contributor

bji219 commented Nov 29, 2021

Chromedriver updates a lot, and it would be nice to manually download and update the latest version of chromedriver each time the scraper is run. I'll see if I can figure it out too.

@bji219
Copy link
Contributor Author

bji219 commented Nov 29, 2021

getting an SSL error otherwise I would check out this autoinstaller

@bji219
Copy link
Contributor Author

bji219 commented Mar 5, 2022

Added these lines to the scraper.py file- should downloaded latest version of chromedriver into working directory each time the scraper is run.

# Get latest chromedriver zip file for mac, extract into same folder
try:
    version = requests.get('https://chromedriver.storage.googleapis.com/LATEST_RELEASE').text
    url = 'https://chromedriver.storage.googleapis.com/{0}/{1}'.format(version, 'chromedriver_mac64.zip')
    r = requests.get(url, allow_redirects=True)
    open('chromedriver.zip', 'wb').write(r.content)
    with zipfile.ZipFile("chromedriver.zip", "r") as zip_ref:
        zip_ref.extractall()
except:
    pass

@bji219 bji219 closed this as completed Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant