From 3e6dfccdd2bc160f3611d0812b12423101a0f730 Mon Sep 17 00:00:00 2001 From: Ali Parlakci Date: Mon, 6 Aug 2018 09:33:07 +0300 Subject: [PATCH] Update request headers --- src/downloader.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/downloader.py b/src/downloader.py index 271d7ad..63b8550 100644 --- a/src/downloader.py +++ b/src/downloader.py @@ -55,12 +55,13 @@ def getFile(fileDir,tempDir,imageURL,indent=0): """ headers = [ - ("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 " \ - "(KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11"), + ("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " \ + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 "\ + "Safari/537.36 OPR/54.0.2952.64"), ("Accept", "text/html,application/xhtml+xml,application/xml;" \ - "q=0.9,*/*;q=0.8"), + "q=0.9,image/webp,image/apng,*/*;q=0.8"), ("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.3"), - ("Accept-Encoding", "none"), + ("Accept-Encoding", "gzip, deflate, br"), ("Accept-Language", "en-US,en;q=0.8"), ("Connection", "keep-alive") ]