Skip to content

Commit f9fda01

Browse files
committed
Replaced requests module with cloudscraper
1 parent 8e6ac55 commit f9fda01

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

garminconnect/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44
import json
55
import re
6-
import requests
6+
import cloudscraper
77
from enum import Enum, auto
88

99
from .__version__ import __version__
@@ -29,7 +29,7 @@ def __init__(self, email, password, is_cn=False):
2929
global SIGNIN_URL
3030
self.email = email
3131
self.password = password
32-
self.req = requests.session()
32+
self.req = cloudscraper.CloudScraper()
3333
self.logger = logging.getLogger(__name__)
3434
self.display_name = ""
3535
self.full_name = ""

garminconnect/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
"""Python 3 API wrapper for Garmin Connect to get your statistics."""
33

4-
__version__ = "0.1.19"
4+
__version__ = "0.1.20"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def read(*parts):
3838
name="garminconnect",
3939
keywords=["garmin connect", "api", "client"],
4040
license="MIT license",
41-
install_requires=["requests"],
41+
install_requires=["requests","cloudscraper"],
4242
long_description_content_type="text/markdown",
4343
long_description=readme,
4444
url="https://github.com/cyberjunky/python-garminconnect",

0 commit comments

Comments
 (0)