Skip to content

loisaidasam/stravalib-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stravalib-scraper

Library for web-scraping Strava data.

Note: Strava does have a developer portal complete with a proper API and examples. This web-scraping based library was initially written years ago, before that API officially came about.

In no way does the author of this library advocate using it, particularly in any way that is abusive or in conflict with Strava's terms or developer guidelines. Proceed at your own risk!

Installation:

$ pip install -r requirements.txt

Command line interface:

To simply login and get the HTML from the dashboard, use the scraper from the command line:

$ ./scraper.py "[email protected]" "your-password"

If there's a specific page you'd like to get info from, say the Rapha Rising challenge from 2012, pass that URL as the final argument:

$ ./scraper.py "[email protected]" "your-password" "https://www.strava.com/challenges/rapha-rising-circle-of-death"

Python interface:

To use the scraper from your own python code, you could do something like this:

from scraper import StravaScraper

email = "[email protected]"
password = "your-password"
scraper = StravaScraper(email, password)
scraper.login()
dashboard_html = scraper.dashboard_content
url = "https://www.strava.com/challenges/rapha-rising-circle-of-death"
response = scraper.get_page(url)
rapha_html = response.content

About

Library for scraping Strava data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages