Skip to main content

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

stravainteractweblib-0.0.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

stravainteractweblib-0.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file stravainteractweblib-0.0.1.tar.gz.

File metadata

  • Download URL: stravainteractweblib-0.0.1.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

Hashes for stravainteractweblib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1f81046fbeef390f6f9548c21275bd8c4e613920d208d0fe15a8ca45da1d417c
MD5 1790ad9cbdfec0143ba703644ecb9dca
BLAKE2b-256 220801729a0a399fd98ff53cbf6cc3a4c3a85ba97e5b1df4b8b9196d5baa4beb

See more details on using hashes here.

File details

Details for the file stravainteractweblib-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for stravainteractweblib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8790ce86a1051797f407b5df701c6967ff968393b44e3a06b93f814f98c883c
MD5 5c1d97b132066239e3ba9b2b67364c24
BLAKE2b-256 9b574b3f1707c4fefd78bbcb3fffd68cce75c9945a0bc19e9d1e75c82f4825ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page