Spaces:
Paused
Paused
set timeout
Browse files- tokopedia.py +4 -2
tokopedia.py
CHANGED
|
@@ -49,7 +49,7 @@ def request_product_id(shop_domain, product_key):
|
|
| 49 |
"X-TKPD-AKAMAI": "pdpGetLayout",
|
| 50 |
}
|
| 51 |
|
| 52 |
-
return requests.request(method="POST", url=endpoint, json=payload, headers=headers)
|
| 53 |
|
| 54 |
|
| 55 |
def request_product_review(product_id, page=1, limit=20):
|
|
@@ -122,4 +122,6 @@ def request_product_review(product_id, page=1, limit=20):
|
|
| 122 |
"X-TKPD-AKAMAI": "productReviewList",
|
| 123 |
}
|
| 124 |
|
| 125 |
-
return requests.request(
|
|
|
|
|
|
|
|
|
| 49 |
"X-TKPD-AKAMAI": "pdpGetLayout",
|
| 50 |
}
|
| 51 |
|
| 52 |
+
return requests.request(method="POST", url=endpoint, json=payload, headers=headers, timeout=30)
|
| 53 |
|
| 54 |
|
| 55 |
def request_product_review(product_id, page=1, limit=20):
|
|
|
|
| 122 |
"X-TKPD-AKAMAI": "productReviewList",
|
| 123 |
}
|
| 124 |
|
| 125 |
+
return requests.request(
|
| 126 |
+
method="POST", url=ENDPOINT, json=payload, headers=headers, timeout=30
|
| 127 |
+
)
|