Skip to content

Commit

Permalink
add RCB as user agent to image requests
Browse files Browse the repository at this point in the history
  • Loading branch information
maloep committed May 21, 2018
1 parent bd698ad commit 09d93a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/lib/dbupdate.py
Expand Up @@ -16,6 +16,7 @@
from config import *
from gamedatabase import *
from pyscraper.scraper import AbstractScraper
from pyscraper.web_scraper import WebScraper
from pyscraper.matcher import Matcher
from pyscraper.nfo_scraper import NFO_Scraper

Expand Down Expand Up @@ -973,7 +974,7 @@ def download_thumb(self, thumburl, destfilename):
tmp = util.joinPath(util.getTempDir(), os.path.basename(destfilename))

log.info("download_thumb: start downloading to temp file: %s" % tmp)
response = requests.get(thumburl, stream=True)
response = requests.get(thumburl, headers=WebScraper._headers, stream=True)
log.info("download_thumb: status code = %s" % response.status_code)
if response.status_code != 200:
log.info("download_thumb: invalid response status code. Can't download image.")
Expand Down

0 comments on commit 09d93a2

Please sign in to comment.