Coder Social home page Coder Social logo

ginglis13 / magic-formula-scraper Goto Github PK

View Code? Open in Web Editor NEW
30.0 4.0 12.0 11.77 MB

scrapes names and tickers from magicformulainvesting.com every quarter, adds info to a google sheet which includes stock prices and a link to the first result of a google search of the company name

Home Page: https://ginglis.me/magic-formula/

License: MIT License

Python 100.00%
google-sheets gspread scraper google-worksheet selenium chrome-browser python3 investing automation automation-selenium

magic-formula-scraper's Issues

Scraper Paste Offset

The scraper pastes the data offset by a few columns in Google Sheets when run.
Screen Shot 2021-11-28 at 7 25 55 PM

Chromedriver/Chrome Browser version mismatch

The code chunk below downloads the latest chromedriver and extracts it which is great, but if the user's chrome browser is at a lower version the code will fail.

# 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

Error text:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 111 Current browser version is 110.0.5481.77 with binary path C:\xxxxx

Proposed solutions: checking if the chromedriver download is necessary before executing the try/except block.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.