Skip to content

Commit

Permalink
Removing headers
Browse files Browse the repository at this point in the history
Removing headers
  • Loading branch information
fkhera committed Feb 22, 2021
1 parent abd0daa commit 393e1fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions powerwallBackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ def authenticate(self):
session = requests.Session()
print "authenticate method"
auth_url = self.authUrl();
headers = {
'User-Agent' : 'PowerwallDarwinManager'
}
# headers = {
# 'User-Agent' : 'PowerwallDarwinManager'
#}
headers = {}
resp = session.get(auth_url, headers=headers)

csrf = re.search(r'name="_csrf".+value="([^"]+)"', resp.text).group(1)
Expand Down
8 changes: 5 additions & 3 deletions powerwallTimeOfUse.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ def authenticate(self):
session = requests.Session()
print "authenticate method"
auth_url = self.authUrl();
headers = {
'User-Agent' : 'PowerwallDarwinManager'
}

#headers = {
# 'User-Agent' : 'PowerwallDarwinManager'
#}
headers = {}
resp = session.get(auth_url, headers=headers)

csrf = re.search(r'name="_csrf".+value="([^"]+)"', resp.text).group(1)
Expand Down

0 comments on commit 393e1fc

Please sign in to comment.