Skip to content

Commit

Permalink
Removed cloudscraper import and usage since we don't need it anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
DJSchaffner committed Mar 26, 2021
1 parent da05339 commit 45bd2fa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import requests
from bs4 import BeautifulSoup
import steam.webapi
import cloudscraper

import utils

Expand Down Expand Up @@ -42,11 +41,7 @@ def query_filelist(self, version: int, depot_id: int):

def _query_website(self, url: str, headers=None, ignore_success=False):
# Doesn't work with cloudflare blocking access
#response = requests.get(url, headers=headers)

# Workaround for the cloudflare protection
scraper = cloudscraper.create_scraper()
response = scraper.get(url, headers=headers)
response = requests.get(url, headers=headers)

if (not ignore_success) and (not self._is_response_successful(response)):
self._print_response_error(response)
Expand Down

0 comments on commit 45bd2fa

Please sign in to comment.