gpt4 book ai didi

Shopee API to get products data doesn't seem to work anymore (it worked before)(用于获取产品数据的Shopee API似乎不再起作用(它以前起作用了))

转载 作者:bug小助手 更新时间:2023-10-28 13:46:56 185 4
gpt4 key购买 nike



Here's a simple scrapy spider that anyone can use for testing.

这是一个简单的蜘蛛,任何人都可以用来测试。


from scrapy.utils.response import open_in_browser
import scrapy
import json

class TestSpider(scrapy.Spider):
name = "test-spider"
allowed_domains = ["shopee.ph"]

shopee_cookies = '[{"name": "csrftoken", "value": "RvxBdTixvBfdTR3xfQwbcYippqz8jEbF", "domain": "shopee.ph", "path": "/", "expires": -1, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "_gcl_au", "value": "1.1.1251411089.1692464842", "domain": ".shopee.ph", "path": "/", "expires": 1700240842, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "SPC_SI", "value": "sTLbZAAAAABwY1ZrR1NNU+WdNgAAAAAAdzlCYXIyVVQ=", "domain": ".shopee.ph", "path": "/", "expires": 1692551246.336331, "httpOnly": true, "secure": true, "sameSite": "Lax"}, {"name": "_fbp", "value": "fb.1.1692464842990.689078803", "domain": ".shopee.ph", "path": "/", "expires": 1700240846, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "SPC_R_T_IV", "value": "NnVEbThnRjREMnNMZVpGVQ==", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.336348, "httpOnly": false, "secure": true, "sameSite": "Lax"}, {"name": "SPC_T_ID", "value": "fn/OKngQO3doGdfFGyo/6mzLiviELHkKEbWM9J+x/ezTl/baT96grQer6ILrYX9tj3Kqs71Jg+hCimaK/XauidJXrd6HdPd2Smbxbu/fEStjOJi5g9/ucMmbBwuyh5M6H3TOGdpUop/9Q/zdpNj6MyxZaODnNsT5XprfsQxjB5g=", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.336355, "httpOnly": true, "secure": true, "sameSite": "Lax"}, {"name": "SPC_T_IV", "value": "NnVEbThnRjREMnNMZVpGVQ==", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.336362, "httpOnly": true, "secure": true, "sameSite": "Lax"}, {"name": "SPC_F", "value": "jiOtuCSNUaap3U4BHHfzhDihWwFht32f", "domain": ".shopee.ph", "path": "/", "expires": 1727024843.162052, "httpOnly": false, "secure": true, "sameSite": "Lax"}, {"name": "REC_T_ID", "value": "dc8a2570-3eb2-11ee-ac9b-2cea7fce6c95", "domain": ".shopee.ph", "path": "/", "expires": 1727024843.16206, "httpOnly": true, "secure": true, "sameSite": "Lax"}, {"name": "SPC_R_T_ID", "value": "fn/OKngQO3doGdfFGyo/6mzLiviELHkKEbWM9J+x/ezTl/baT96grQer6ILrYX9tj3Kqs71Jg+hCimaK/XauidJXrd6HdPd2Smbxbu/fEStjOJi5g9/ucMmbBwuyh5M6H3TOGdpUop/9Q/zdpNj6MyxZaODnNsT5XprfsQxjB5g=", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.33634, "httpOnly": false, "secure": true, "sameSite": "Lax"}, {"name": "_QPWSDCXHZQA", "value": "4a585493-a7a0-4f0e-d696-687295d3a4c3", "domain": "shopee.ph", "path": "/", "expires": 1692496379, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "IDE", "value": "AHWqTUm1b5ZflCqDTn6cpHDjyoeqH6iLfXcCOOm4YNaP8CHTsAZ7F_Daq4-zO-bsGIk", "domain": ".doubleclick.net", "path": "/", "expires": 1727024843.787698, "httpOnly": true, "secure": true, "sameSite": "None"}, {"name": "AMP_TOKEN", "value": "%24NOT_FOUND", "domain": ".shopee.ph", "path": "/", "expires": 1692468444, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "_ga", "value": "GA1.2.833255521.1692464843", "domain": ".shopee.ph", "path": "/", "expires": 1727024844.498551, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "_gid", "value": "GA1.2.1347861977.1692464844", "domain": ".shopee.ph", "path": "/", "expires": 1692551244, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "_dc_gtm_UA-61918643-6", "value": "1", "domain": ".shopee.ph", "path": "/", "expires": 1692464904, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "shopee_webUnique_ccd", "value": "raj%2F3ukNopIWTrFjVLQeGA%3D%3D%7C1%2BjiV3ga9OlzuAELTZtedUY5BlP1ZNVH5ybZJx2D4KNA9dGTvtFakjnNZvR64zKNG6yBDfEXdabTE%2FRKow%3D%3D%7CsWIQ7u7pR4F3BD7E%7C08%7C3", "domain": "shopee.ph", "path": "/", "expires": 1692496381, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "ds", "value": "065598fda3b7cca4e5e241e446a075e9", "domain": "shopee.ph", "path": "/", "expires": 1692496381, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "SPC_EC", "value": "RTJYa2Q5WEV4UDNnN3VGWr68rFv1FRJEeVkpwAzlu09WhtwSxFE1cZlwpQYRhhR56REixPuKfekz6oioE4EaDK12bvALil+QZ5B0EfG42psIFWNDe1moiErTZndyu1502KUlh5+OQoUWCvm1XkVY+2Iy7Jk5qyPI2J655JeZwv0=", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.336291, "httpOnly": true, "secure": true, "sameSite": "Lax"}, {"name": "SPC_ST", "value": ".ek1DVmo5aGJjaVBxcklYU5o4/3v/8ndPeV2/fwtzWYUh1kWOopWvn7SFoQXWuS37Rs+J+Ym7U8OwOG73JbiFRWyOOo1GhKBgwhUeeWfE+q9XPDZXACC33t7qphoBu5hyWvR/G+WkpSUbIkmGPzprCIvhw7Qwyt8UFxk/4bA+47QQQUiDcPfHIq/sJqmVMEqH3Al6nCTDeEh/JCDLALRvNQ==", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.336324, "httpOnly": true, "secure": true, "sameSite": "Lax"}, {"name": "SPC_CLIENTID", "value": "amlPdHVDU05VYWFwgvlavxoisbqjmacw", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.336374, "httpOnly": false, "secure": false, "sameSite": "Lax"}, {"name": "_ga_CB0044GVTM", "value": "GS1.1.1692464843.1.0.1692464846.57.0.0", "domain": ".shopee.ph", "path": "/", "expires": 1727024846.367333, "httpOnly": false, "secure": false, "sameSite": "Lax"}]'

shopee_cookies = json.loads(shopee_cookies)

def start_requests(self):
yield scrapy.Request(
"https://shopee.ph/api/v4/pdp/get_pc?shop_id=237078553&item_id=6929743700",
cookies=self.shopee_cookies,
headers={"x-api-source":"pc","af-ac-enc-dat":"null"},
callback=self.parse_item,
)


def parse_item(self,response):
open_in_browser(response)

Feel free to test it out as I provided the cookies as well (because the cookies are needed). Now as you can see, this piece of code actually worked before, around early August 2023. I had challenges to make it work before but thanks to this answer I managed to get the products data. You can even see my comment there. Here's an image I screenshot before proving that it did work around early August.

请随意测试它,因为我也提供了Cookie(因为需要Cookie)。现在如你所见,这段代码以前实际上是有效的,大约在2023年8月初。我以前遇到过让它工作的挑战,但多亏了这个答案,我设法获得了产品数据。你甚至可以在那里看到我的评论。这是一张我在证明它在8月初确实奏效之前的截图。


enter image description here


As you can see the data is there and works well. Thanks to the headers {"x-api-source":"pc","af-ac-enc-dat":"null"} that made it worked. However as of August 20, 2023 as I am typing this. It seems that it doesn't work anymore. I'm not sure why, but I think there's some changes with the API that has happened. I spent all day trying to figure out and play with the headers but no luck. All I got right now as a result is this.

正如您所看到的,数据就在那里,并且运行良好。多亏了标题{“x-api-source”:“pc”,“af-ac-enc-dat”:“NULL”},它才能正常工作。然而,截至2023年8月20日,就在我打字的时候。它似乎不再起作用了。我不知道为什么,但我认为API已经发生了一些变化。我花了一整天的时间试图弄清楚和玩头球,但没有运气。结果,我现在得到的只有这个。


Output I am having right now:

我现在的产出是:



{"is_customized":false,"is_login":true,"platform":0,"action_type":2,"error":90309999,"tracking_id":"24d95bd5-40e5-44cd-b30b-885711481170","report_extra_info":""}



Here is the actual product page link I used for testing. You can see the API there when you do "Inspect Element" -> "Network" tab. Take note that the output I am having right now is the same one I had before I managed to implement this solution. But right now it's back at it again. So the question is, could there be a way to make it work again? I feel like it's something with the headers that I am not getting it right, but I am not sure how to figure it out and that is why I am seeking help right now as I am out of solutions.

以下是我用于测试的实际产品页面链接。当你做“检查元素”->“网络”选项卡时,你可以在那里看到API。请注意,我现在拥有的输出与我设法实现此解决方案之前的输出相同。但现在,它又回来了。因此,问题是,有没有办法让它再次发挥作用?我觉得这是因为我的标题不正确,但我不确定如何解决它,这就是为什么我现在寻求帮助,因为我没有解决方案。


更多回答
优秀答案推荐

As I said in a comment on another article, it seems that the their anti-crawling method has changed.

正如我在另一篇文章的评论中所说,他们的反爬行方法似乎发生了变化。


If there is a problem with the api response, you can check the problem with the following procedure.

如果接口响应有问题,可以通过以下步骤进行检查。



  1. get full api request


curl 'https://shopee.ph/api/v4/pdp/get_pc?shop_id=237078553&item_id=6929743700' \
-H '744a5de7:<value>' \
-H 'authority:<value>' \
-H 'accept:<value>' \
-H 'accept-language:<value>' \
-H 'af-ac-enc-dat:<value>' \
-H 'af-ac-enc-sz-token:<value>' \
-H $'afe5f082:<value> '\
-H 'content-type:<value>' \
-H 'cookie:<value>' \
-H 'dd46895e:<value>' \
-H 'referer:<value>' \
-H 'sec-ch-ua:<value>' \
-H 'sec-ch-ua-mobile:<value>' \
-H 'sec-ch-ua-platform:<value>' \
-H 'sec-fetch-dest:<value>' \
-H 'sec-fetch-mode:<value>' \
-H 'sec-fetch-site:<value>' \
-H 'sz-token:<value>' \
-H 'user-agent:<value>' \
-H 'x-api-source:<value>' \
-H 'x-csrftoken:<value>' \
-H 'x-requested-with:<value>' \
-H 'x-sap-ri:<value>' \
-H 'x-shopee-language:<value>' \
-H 'x-sz-sdk-version:<value>' \
--compressed

Unlike when I tried before, something was added.
random elements like 744a5de7, $afe5f082, dd46895e

与我以前尝试的时候不同的是,增加了一些东西。随机元素,如744a5de7、$afe5f082、dd46895e



  1. check api expire time
    some api has expire time.
    Most have expiration times in minutes, but I've seen sites that expire in 10 seconds.


by test, the their api's expire time is 60~120 seconds.

经测试,其API的过期时间为60~120秒。


so I need to get full api request evert 1minutes.

所以我需要每隔1分钟获得完整的API请求。



  1. find the necessary header elements.
    by remove one line, I can find below elements are necessary.


  -H $'24d10ef2: \
-H '5025235d: \
-H '744a5de7:\
-H 'af-ac-enc-dat:\
-H 'cookie:\
-H 'user-agent:\
-H 'x-csrftoken:\
-H 'x-sap-ri:\

random element, af-ac-enc-dat, cookie, user-agent, x-csrftoken, x-sap-ri
is necessary.

随机元素、af-ac-enc-dat、cookie、用户代理、x-csrf令牌、x-sap-ri是必需的。



  1. check changed value validate
    af-ac-enc-dat:null is this case.


It's amazing that this worked until early August.

令人惊讶的是,这种做法一直持续到8月初。


When I tried, "af-ac-enc-dat" is a value client creates with cookies and time.
It should not be changed.
af-ac-enc-dat is made by cookies, cookies also can not change.

当我尝试时,“af-ac-enc-dat”是客户端用cookie和时间创建的值。它不应该被改变。af-ac-enc-dat是由cookies制作的,cookies也不能更改。


so you need to figure out

所以你需要弄清楚



  • how to make random 3 element's name and value

  • how to make af-ac-enc-dat, x-csrftoken, x-sap-ri


It seems to me that you are getting it by logging in when you get the cookie.

在我看来,当你拿到曲奇的时候,你是通过登录来获得的。


In my experience, even if you scrape through a proxy, scraping fails after a certain period of time.

根据我的经验,即使你通过代理进行抓取,抓取也会在一段时间后失败。


And when you access it, it says that abnormal traffic has been detected and slides to prove you're not a robot.

当你访问它时,它会说检测到了异常流量,并进行滑动以证明你不是机器人。


So I tried scraping with a non-login cookie.

因此,我尝试使用非登录Cookie进行抓取。


Scraping was possible through multiple cookie sets and multiple proxies.

可以通过多个Cookie集和多个代理进行抓取。


conclusion


I tried very hard to scrape it,
but I couldn't get past the their ever-changing defenses.

我费了很大力气才把它擦破,但我无法通过他们千变万化的防守。


So I gave up at early July.

所以我在七月初就放弃了。


I hope you can solve this problem.

我希望你能解决这个问题。



i have an error too. already checked. i think they are changing the headers req. it looks like this

我也有一个错误。已经查过了。我认为他们正在更改标题请求。它看起来是这样的


GET /api/v4/shop/get_products_tab_data?by=popular&country=ID&from_source=search&limit=50&offset=0&order=desc&shop_id=224781834&start_ts=1690041600&upstream=pdp HTTP/2
Host: shopee.co.id
Cookie: SPC_F=CLE38NzQuOfu72ZZK3Fbk7uSV4Rl0Om3; REC_T_ID=cbe26cbc-29fb-11ee-b7ba-f4ee08290b63; _gcl_au=1.1.2119733819.1690471447; _fbp=fb.2.1690471447353.1570533404; SPC_CLIENTID=Q0xFMzhOelF1T2Z1eyyrhwwxishawszz; _med=cpc; csrftoken=FE3h0UK9cUKTSpcXbrms3HaOuZQLI4y6; SPC_SI=tTLbZAAAAAA5dDM5MWZkVzVNhQAAAAAAa1Fnb3Njc0k=; _QPWSDCXHZQA=28c21620-bf64-4cbc-c3bb-768c09ddd94d; _gid=GA1.3.1329493720.1692587428; _gcl_aw=GCL.1692587441.EAIaIQobChMIrbCJv-PsgAMVf4FLBR3v_wQWEAAYASAAEgKW__D_BwE; _gac_UA-61904553-8=1.1692587442.EAIaIQobChMIrbCJv-PsgAMVf4FLBR3v_wQWEAAYASAAEgKW__D_BwE; SPC_P_V=Epj8h5wnEQ2sD4OURKKvdycouuCI2YHaEekG7u9ezsvZjWGjPUhg9DFetTavXFCO3C63OOwrXzWL3gx7VDRvGkixJ2mTfc0wMCLFgyaJR+LQkC4eHAmRDCMKtHmCQXgF7RGQD5PFFx7OUbXAnu1pAktVpve6NGOAmNre/519svI=; SPC_ST=.MU83cVROQjhGZURLbEttONiDXDjrLsd6vGNERy6F8f7m5LTefdR1H4zNcrAdW+VXk5rjEyEaPFJrUPnNEJF9aPcTfrS9nukBbsb7f2TWvCqSL14xvK4145VpW1935EAZ8y+TNM2Ii2NELgi9KzO/lsjyeJtM4bhHd9vpAhoZZ2KO9psk92WId+lPjpjNiJO03Q19o3Gldiqu/6uo3B/JYg==; SPC_U=1047715958; SPC_R_T_ID=pkA90hKsNpTPhCjad/aK1CSaQhpsMokArXQS2nqHnSaHqC/ct9z7kJ2SCT3qtALegWNHd6YnNt4cZgTOn+WGaEhBZGEKlLc/OTynALNC7IrPpFqcJasaF/DOKX8imMsEr+9Wnct0GJ77BzJIiYF3riCD8PuMnY05yOMIk5D4yew=; SPC_R_T_IV=UHVXbzB3MXhYMW1SUEdVVQ==; SPC_T_ID=pkA90hKsNpTPhCjad/aK1CSaQhpsMokArXQS2nqHnSaHqC/ct9z7kJ2SCT3qtALegWNHd6YnNt4cZgTOn+WGaEhBZGEKlLc/OTynALNC7IrPpFqcJasaF/DOKX8imMsEr+9Wnct0GJ77BzJIiYF3riCD8PuMnY05yOMIk5D4yew=; SPC_T_IV=UHVXbzB3MXhYMW1SUEdVVQ==; shopee_webUnique_ccd=9wlap15q38u%2FjyDqeMXhSw%3D%3D%7CZJYFYh7ffzXrGWxFVrISb4CSSzK9huoBudwqWNpox09%2BIx9P3SCcAlZk3OsGAXz5TLVKLpJ0a0iBycFR%7CQeZNQ4uANkX3tHiI%7C08%7C3; ds=76644e11d13873c9fe6a40f193246e70; _ga=GA1.1.2011873235.1690471457; _dc_gtm_UA-61904553-8=1; SPC_EC=RklXT0ZlZVA2SmNDaTBIQslEsqR691BJDKmMLa1HhAOn7CSTgdQMN47UZ11FxNpmCyIvU7bi0z4zj64SpXGi094UHX2jaE6xBmOYAkJYNhFUdS/dRHoI1mcdwpf9rVJ8+kK8og9iFWju20lnzu1cuWyqQXf60ZF9JcbK3lQvHNA=; _ga_SW6D8G0HXK=GS1.1.1692600956.8.1.1692600957.59.0.0
2495ee40: *GTT#ILZ,J*RgDF&)2Sth7u:Q
X-Sz-Sdk-Version: 2.9.2-2&1.4.1
94d942d2: W1+Q&gY<k'_qcBegg9t1Fo*q5FJ!f]'!H/Bbi&LJH\7M$L=]"p.F8/*q_!ZNU(E%'CkE'0R-3ps8iL[Nc&G44^P_@_C"ik0h7kT-lWVD"e/[>Z7X1YHj)2[`r\uj8A[XO3+]gHb#[5fKf70G\r%e:G6f$G3dPVl;)b)lbWSB^J`Kff9;/IeaQ(%b'+iLX)]Ku4D@?:u'0?*@*(%$[qb0Tf%J[Ug6fd`H+c!,k>P.Vkf!4q2*6,3>)KYh9eJ,:^?H=5iR1usTREU^.A-g\_%.NG6W9bt+?8`Q0BE(gTS%N/oQ5sfi!?V$9pdYBfOdh5Ltr,Q2ADr::L*%[LDd:L@W,X.%)b4l\LId@>G1mjFUrJ-cn
Content-Type: application/json
X-Api-Source: rweb
Accept: application/json
X-Sap-Ri: 7f0ae3643a8576b6061b7b3e6051550dd3d3ae970d1848a4
X-Shopee-Language: id
X-Requested-With: XMLHttpRequest
Af-Ac-Enc-Dat: AAcyLjkuMi0yAAABihYUIzMAAAk4AhAAAAAAAAAAAj+vsCPwylZoRHPu2FkyOahImkli6vLJCbuzSNfcvOA2MvU3/glR7XXjpBf9OrfqNg0mzEILeQPCPwQV0LGu6fsc6r5SZ42c29f5Z5ZZkl4yABQf6F0BVj8sQ0WYkYmoESJOfiuWtwIWPXWm0HBmx8M2f0K9Ewk+vnXz4P7b/AUmFUafOtiMif1YsmByR1llShH1Us3tzoAHKX+I31z8KKr7bebm+/ENf3wKONAR64IoqmkR6k8atRN4Yc7bLxyKnY2b65J2uyInBO0b3ZjL35k2S3rNoDsVvIeo353RcLV9UURJuBX5jq4Vq+gCwVHcilv9U0yTna/j6pLZztTVoRnT2+/me2cRbNI3CgQTcHMq+u/tI/m5zHMDo/4eXEjxrR7QQhOX/zYTJ8PH9tVFw9ppG9ibG96q2PCCXr4o3YBLU4FYNS9R2gSyN55l0IR8SGtsTv5PXjEGGWy3DMVVukZKDs+2xRv0gXc8lWmt0UYfw3ZPVH4/olSOzfJYqlihOvXD45KX/zYTJ8PH9tVFw9ppG9ibl/82EyfDx/bVRcPaaRvYmwEDdbQH+lNoUXKNoOx37UC8g0SuAAy3ruovb6c/Rh1R1rDHZxOYuVToBnEUdNMU8iF9xjfeiUsBvxyc2zYqd8M314W5o9rQJlSKvfvREBIMgl/OQC8M5ma/UJgoo7r+g+34mcW/JFW26nxtNEcHnpU=
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
X-Csrftoken: FE3h0UK9cUKTSpcXbrms3HaOuZQLI4y6
4a12d42b: 1;fI>#8q*F>+W8`]Yi@Wr>rZ*
Af-Ac-Enc-Sz-Token: 9wlap15q38u/jyDqeMXhSw==|ZJYFYh7ffzXrGWxFVrISb4CSSzK9huoBudwqWNpox09+Ix9P3SCcAlZk3OsGAXz5TLVKLpJ0a0iBycFR|QeZNQ4uANkX3tHiI|08|3
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://shopee.co.id/vearst?shop=224781834&tab=1&upstream=search
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

hope it helps.

希望能有所帮助。


for now, the viable solution is you make a bunch of acc, then rotate it when it hits the rate limiter. give it 15-30 mins to cool down if all acc got rate-limit (in my case status code 418).

就目前而言,可行的解决方案是您创建一组Acc,然后在它达到速率限制器时进行轮换。如果所有访问都达到速率限制(在我的情况下,状态代码为418),则给它15-30分钟来冷却。



You can use shopee mobile api instead, using

您可以改用Shopee移动API,使用



/api/v4/pdp/cart_panel/get



For example in python:

例如在Python中:


import requests
from pprint import pprint

url = "https://mall.shopee.vn/api/v4/pdp/cart_panel/get"
data = {
"item_id" : 20103528776,
"shop_id" : 218993976,
"quantity" : 1,
}

item_info = requests.post(url= url, json = data).json()

pprint(item_info)

And the output is a bit less informative compared to the original:

与原始版本相比,输出的信息量稍少:


{'data': {'is_direct_buy_now_to_opc': True,
'item': {'image': 'vn-11134207-7r98o-lkufiewkx39c85',
'is_hide_stock': False,
'is_official_shop': True,
'item_has_size_recommendation': False,
'item_id': 20103528776,
'models': [{'is_selectable': True,
'model_id': 135798969787,
'name': '',
'price': {'range_max': -1,
'range_min': -1,
'single_value': 29900000000},
'price_before_discount': {'range_max': -1,
'range_min': -1,
'single_value': 59000000000},
'stock': 50,
'tier_index': [0]}],
'overall_purchase_limit': {'order_max_purchase_limit': 0},
'price': {'range_max': -1,
'range_min': -1,
'single_value': 29900000000},
'price_before_discount': {'range_max': -1,
'range_min': -1,
'single_value': -1},
'promotion_labels': {'is_live_streaming_ongoing': False,
'is_live_streaming_price': False,
'pre_order_text': '',
'wholesale_text': ''},
'shop_id': 218993976,
'spl_channel_id': 0,
'stock': 50,
'tier_variations': [{'options': [{'image': '', 'name': ''}],
'title': ''}],
'tracking': {'brand': 'ROBOT',
'cat_id': 100013,
'categories': [{'catid': 100013,
'display_name': 'Điện Thoại & '
'Phụ Kiện',
'is_default_subcat': False,
'no_sub': False},
{'catid': 100075,
'display_name': 'Phụ kiện',
'is_default_subcat': False,
'no_sub': False},
{'catid': 100287,
'display_name': 'Sạc dự phòng '
'& Pin',
'is_default_subcat': False,
'no_sub': False},
{'catid': 100486,
'display_name': 'Sạc dự phòng',
'is_default_subcat': False,
'no_sub': True}],
'name': 'Pin Sạc Dự Phòng 20000mAh ROBOT RT22 '
'LED 2 Cổng Sạc Vào Micro/Type C & 2 '
'Cổng Sạc Ra USB',
'price': 29900000000}},
'method': 0,
'selected_tiers': {'0': 0},
'selected_variation': {'max_quantity': 801,
'model_id': 135798969787,
'price': {'range_max': -1,
'range_min': -1,
'single_value': 29900000000},
'price_before_discount': {'range_max': -1,
'range_min': -1,
'single_value': 59000000000},
'promotion_labels': {'is_live_streaming_ongoing': False,
'is_live_streaming_price': False,
'pre_order_text': '',
'wholesale_text': ''},
'quantity_in_cart': 0,
'recommend_voucher_result': {},
'stock': 801,
'tier_index': [0]},
'show_cart_panel': False}}

Note that this is just a temporary solution. I don't know when that method will be changed

请注意,这只是一个临时解决方案。我不知道什么时候会改变这个方法


更多回答

wait, so you managed to get the result with these headers?

等等,所以你成功地得到了这些标题的结果?

yes. my strategy is using many accounts in rotation. and as @Giuk Kim said, you need to test/check the necessary header elements, because in the headers there are some tracker IDs to track crawling/scraping activities.

是。我的策略是轮流使用许多账户。正如@GIUK Kim所说,您需要测试/检查必要的Header元素,因为在Header中有一些跟踪器ID来跟踪爬行/抓取活动。

Hey Luna, that's amazing! Could you let me know which part of the application you found this endpoint in?

嗨,露娜,太棒了!您能告诉我您在应用程序的哪个部分找到此终结点吗?

185 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com