Skip to content

Commit

Permalink
- Made a temporary fix designed for steamdb and use a user agent that…
Browse files Browse the repository at this point in the history
… SHOULD not break soon
  • Loading branch information
DJSchaffner committed Oct 19, 2020
1 parent 75b3b72 commit 375bff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import utils

class Webhook:
# Just some user agent because steamdb rejects requests without one
# @TODO prevent this from breaking when the brower gets outdated because steamdb will start to send 503 response then
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0'}
# For some reason steamdb allows twitterbot to read all sites (https://steamdb.info/robots.txt)
# @TODO prevent this from breaking in case steamdb decides to block twitterbot user-agent... avoid detection / rotate user agents / use selenium
headers = {'User-Agent' : 'Twitterbot/1.0'}

def query_patch_change_list(self):
"""Query a list of changed depots for all patches.
Expand Down

0 comments on commit 375bff2

Please sign in to comment.