From 375bff2b7a6f123bcfe6373cf52982e5859b13b7 Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Mon, 19 Oct 2020 23:50:07 +0200 Subject: [PATCH] - Made a temporary fix designed for steamdb and use a user agent that SHOULD not break soon --- src/webhook.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webhook.py b/src/webhook.py index 13e74b1..1b66109 100644 --- a/src/webhook.py +++ b/src/webhook.py @@ -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.