fix empty results: remove Accept-Encoding to avoid brotli decode issue
This commit is contained in:
6
app.py
6
app.py
@@ -15,11 +15,7 @@ def get_headers():
|
|||||||
return {
|
return {
|
||||||
"User-Agent": random.choice(USER_AGENTS),
|
"User-Agent": random.choice(USER_AGENTS),
|
||||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
|
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
|
||||||
"Accept-Language": "en-US,en;q=0.5",
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
"Accept-Encoding": "gzip, deflate, br",
|
|
||||||
"DNT": "1",
|
|
||||||
"Connection": "keep-alive",
|
|
||||||
"Upgrade-Insecure-Requests": "1",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def scrape_images(query, page=0):
|
def scrape_images(query, page=0):
|
||||||
|
|||||||
Reference in New Issue
Block a user