Skip to content

Commit 5188178

Browse files
authored
Add custom user-agent headers (#37)
1 parent 3963513 commit 5188178

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

growattServer/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class GrowattApi:
2727

2828
def __init__(self):
2929
self.session = requests.Session()
30+
headers = {'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android'}
31+
self.session.headers.update(headers)
3032

3133
def __get_date_string(self, timespan=None, date=None):
3234
if timespan is not None:

0 commit comments

Comments
 (0)