gingeleski / odds-portal-scraper

Sports odds and results scraping for Odds Portal (oddsportal.com).
The Unlicense
109 stars 53 forks source link

Write new proof-of-concept scraper for user predictions #4

Closed gingeleski closed 5 years ago

gingeleski commented 5 years ago

This issue is prompted by an email I received from a fan of this project named Dmitry.

He'd written some scraping code to grab data of a user he follows on Odds Portal who makes private predictions. The results from his code seemed unstable.

I'm tackling this use case out of curiosity for how my approach might be different to his. I haven't looked at this project in several years, really, and write scrapers differently now than I used to. 🥇

The way I see it, whether a user making predictions is public or private doesn't really affect the scraping approach. My proof-of-concept logic should apply either way.

Pseudo-code works out to...

Sign in
Go to your user profile
Go to "following"
Collect list of handicappers you're following
For each handicapper in the list...
    Get that handicapper's next predictions - https://www.oddsportal.com/profile/OldTwinTowersFutbol/my-predictions/next/
    For each page of predictions...
        ACTION: Save screenshot
        For each prediction...
            ACTION: Get sport
            ACTION: Get region
            ACTION: Get league
            ACTION: Get start time
            ACTION: Get game name
            ACTION: Get game specifier
            ACTION: Get link to the game on Odds Portal
            ACTION: Get outcome odds
                ACTION: Get picked outcome
gingeleski commented 5 years ago

Slight update - after speaking more recently with this individual, the situation is not quite as described in my first post.

Nevertheless I will complete this PoC eventually.