Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Commit

Permalink
Fix: set session._headers in __init__, again; was changed in 1e4bc11
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeer committed Dec 17, 2019
1 parent e989f5e commit c1e31be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def __init__(self):
# this stays `None` for guest sessions
self.username = None

self._headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"
}
# sets self._headers
self.reset_headers()

Expand Down Expand Up @@ -456,6 +459,7 @@ async def test(self, username, more_replies_test=True):
# debug('[TimelineTermination] Request failed for ' + result["tests"]["search"])
# debug(e)


debug('Writing result for ' + result['profile']['screen_name'] + ' to DB')
db.write_result(result)
return result
Expand Down

0 comments on commit c1e31be

Please sign in to comment.