mirror of
https://github.com/KevinMidboe/bulk-downloader-for-reddit.git
synced 2025-10-29 17:40:15 +00:00
Fixed request headers
This commit is contained in:
@@ -61,7 +61,7 @@ def getFile(fileDir,tempDir,imageURL,indent=0):
|
|||||||
("Accept", "text/html,application/xhtml+xml,application/xml;" \
|
("Accept", "text/html,application/xhtml+xml,application/xml;" \
|
||||||
"q=0.9,image/webp,image/apng,*/*;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-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.3"),
|
||||||
("Accept-Encoding", "gzip, deflate, br"),
|
("Accept-Encoding", "none"),
|
||||||
("Accept-Language", "en-US,en;q=0.8"),
|
("Accept-Language", "en-US,en;q=0.8"),
|
||||||
("Connection", "keep-alive")
|
("Connection", "keep-alive")
|
||||||
]
|
]
|
||||||
@@ -401,6 +401,8 @@ class Gfycat:
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
raise NotADownloadableLinkError("Could not read the page source")
|
raise NotADownloadableLinkError("Could not read the page source")
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
|
#debug
|
||||||
|
raise exception
|
||||||
raise NotADownloadableLinkError("Could not read the page source")
|
raise NotADownloadableLinkError("Could not read the page source")
|
||||||
|
|
||||||
POST['postExt'] = getExtension(POST['mediaURL'])
|
POST['postExt'] = getExtension(POST['mediaURL'])
|
||||||
|
|||||||
Reference in New Issue
Block a user