Extends the Strava v3 API using web scraping and web browser interactions
Project description
stravainteractweblib
Extends the Strava v3 API using web scraping and web browser interactions. Extends stravaweblib and therefore stravalib functionality.
Requirements
This package uses a selenium Firefox instance to interact with the strava website. Therefore, you need to install geckodriver and add it to the PATH variable.
However stravainteractweblib
can handle this for you.
from stravainteractweblib import InteractiveWebClient
InteractiveWebClient.setup_geckodriver()
client = InteractiveWebClient(access_token=OAUTH_TOKEN, email=EMAIL, password=PASSWORD)
Authentication
See stravaweblib, on how to authenticate
Added Functionality
Changing Stats visibility
Stats cannot be set private by default using the strava API v3 and require the interaction with the edit page.
from stravainteractweblib import InteractiveWebClient
# Log in (requires API token and email/password for the site)
client = InteractiveWebClient(access_token=OAUTH_TOKEN, email=EMAIL, password=PASSWORD)
# Get the first activity id (uses the normal stravalib API)
activities = client.get_activities()
activity_id = activities[0].id
# set the heart rate data of the activity to private
client.change_stats_visibility(activity_id = activity_id, heart_rate = False)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stravainteractweblib-0.0.2.tar.gz
.
File metadata
- Download URL: stravainteractweblib-0.0.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09f36c4139a163de98cc6dd12625cc3ae7a098a4260e36705926367e52df73ca |
|
MD5 | a1fb707ae45e227630eb2689bc043947 |
|
BLAKE2b-256 | c963dd79332f340b84d26f970a49cc6ed8cbd4f0b51939bf56faa5d8f14596aa |
File details
Details for the file stravainteractweblib-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: stravainteractweblib-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b6f08594def1cf25e45632f4a3db5089d42b6c64f40fe9a4b4d7e74da292c98 |
|
MD5 | c265a1cff2291e751aa1e0d3faffa182 |
|
BLAKE2b-256 | db2da33f71c566b763130dd2441d329c34bb8a2a9e3cd206310d5a87fb3c82a3 |