Spaces:
Running
Running
update url
Browse files- tokopedia.py +3 -4
tokopedia.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
import requests
|
2 |
|
3 |
-
ENDPOINT = "https://gql.tokopedia.com/graphql/productReviewList"
|
4 |
-
|
5 |
def request_product_id(shop_domain, product_key):
|
6 |
-
endpoint = "
|
7 |
payload = {
|
8 |
"operationName": "PDPGetLayoutQuery",
|
9 |
"variables": {
|
@@ -55,6 +53,7 @@ def request_product_id(shop_domain, product_key):
|
|
55 |
|
56 |
|
57 |
def request_product_review(product_id, page=1, limit=20):
|
|
|
58 |
payload = {
|
59 |
"operationName": "productReviewList",
|
60 |
"variables": {
|
@@ -123,4 +122,4 @@ def request_product_review(product_id, page=1, limit=20):
|
|
123 |
"X-TKPD-AKAMAI": "productReviewList",
|
124 |
}
|
125 |
|
126 |
-
return requests.request(method="POST", url=ENDPOINT, json=payload, headers=headers)
|
|
|
1 |
import requests
|
2 |
|
|
|
|
|
3 |
def request_product_id(shop_domain, product_key):
|
4 |
+
endpoint = "http://gql.tokopedia.com/graphql/PDPGetLayoutQuery"
|
5 |
payload = {
|
6 |
"operationName": "PDPGetLayoutQuery",
|
7 |
"variables": {
|
|
|
53 |
|
54 |
|
55 |
def request_product_review(product_id, page=1, limit=20):
|
56 |
+
ENDPOINT = "http://gql.tokopedia.com/graphql/productReviewList"
|
57 |
payload = {
|
58 |
"operationName": "productReviewList",
|
59 |
"variables": {
|
|
|
122 |
"X-TKPD-AKAMAI": "productReviewList",
|
123 |
}
|
124 |
|
125 |
+
return requests.request(method="POST", url=ENDPOINT, json=payload, headers=headers)
|