Commit
·
6f73d82
1
Parent(s):
b5f962a
Update app.py
Browse files
app.py
CHANGED
@@ -79,9 +79,10 @@ def scrape_tokped(nama_barang, num_items):
|
|
79 |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36',
|
80 |
'Accept-Language': 'en-US,en;q=0.5',
|
81 |
'Accept-Encoding': 'gzip, deflate, br',
|
82 |
-
'Connection': 'keep-alive'
|
|
|
83 |
}
|
84 |
-
timeout =
|
85 |
try :
|
86 |
|
87 |
response = requests.get(url, headers = headers, timeout = timeout)
|
|
|
79 |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36',
|
80 |
'Accept-Language': 'en-US,en;q=0.5',
|
81 |
'Accept-Encoding': 'gzip, deflate, br',
|
82 |
+
'Connection': 'keep-alive',
|
83 |
+
'Referer': 'https://www.google.com' # Ganti dengan URL referer yang sesuai
|
84 |
}
|
85 |
+
timeout = 50
|
86 |
try :
|
87 |
|
88 |
response = requests.get(url, headers = headers, timeout = timeout)
|