vaccuchuoi 0 Đã viết 27/07/2020 muốn xem code Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
quimao 2 Đã viết 4/08/2020 hay quá, cảm ơn bác đã dày công nghiên cứu Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Ducnavy 0 Đã viết 24/08/2020 <3 Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Toan Nguyen 0 Đã viết 24/08/2020 hay Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
sonnt98 5 Đã viết 18/11/2020 cảm ơn bác Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Sunan Malik 0 Đã viết 25/11/2020 good thread upppp sir can i ask ? when i want add too cart why error 19 appear ? please give me som solution thanks before response = r.get('https://shopee.vn/api/v2/login') cookie_string = "; ".join([str(x)+"="+str(y) for x,y in response.cookies.get_dict().items()]) headers = { 'user-agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', 'referer' : 'https://shopee.vn/vivo-Y30-6GB-128GB-6-47-Ultra-O-Screen-Fast-Charging-MTK6765-i.30843261.4744153777', #example product 'x-requested-with': 'XMLHttpRequest', 'x-api-source' : 'pc', 'x-csrftoken' : csrftoken_gen, 'cookie' : "csrftoken=" + csrftoken_gen + ";"+ cookie_string } url="https://shopee.vn/api/v2/cart/add_to_cart" response = r.request("POST",url,headers=headers, json={"quantity":1,"checkout":"true","update_checkout_only":"false","donot_add_quantity":"false","source":"{\"refer_urls\":[]}","client_source":1,"shopid":30843261,"itemid":4744153777,"modelid":30736206168}) cart_url = 'https://shopee.co.id/api/v1/account_info/?need_cart=1&skip_address=1' go_cart = r.get(cart_url, headers=headers, verify=False) Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Thiên Chi Kiều Nữ 959 Đã viết 27/11/2020 On 11/25/2020 at 4:06 PM, Sunan Malik said: good thread upppp sir can i ask ? when i want add too cart why error 19 appear ? please give me som solution thanks before response = r.get('https://shopee.vn/api/v2/login') cookie_string = "; ".join([str(x)+"="+str(y) for x,y in response.cookies.get_dict().items()]) headers = { 'user-agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', 'referer' : 'https://shopee.vn/vivo-Y30-6GB-128GB-6-47-Ultra-O-Screen-Fast-Charging-MTK6765-i.30843261.4744153777', #example product 'x-requested-with': 'XMLHttpRequest', 'x-api-source' : 'pc', 'x-csrftoken' : csrftoken_gen, 'cookie' : "csrftoken=" + csrftoken_gen + ";"+ cookie_string } url="https://shopee.vn/api/v2/cart/add_to_cart" response = r.request("POST",url,headers=headers, json={"quantity":1,"checkout":"true","update_checkout_only":"false","donot_add_quantity":"false","source":"{\"refer_urls\":[]}","client_source":1,"shopid":30843261,"itemid":4744153777,"modelid":30736206168}) cart_url = 'https://shopee.co.id/api/v1/account_info/?need_cart=1&skip_address=1' go_cart = r.get(cart_url, headers=headers, verify=False) sorry for i was late =.='' ... but seem you are using python, here for autoit program language =.='' next time you need creat new topic in python question, i will get your question soon.. here is python success code (add item to cart) : import requests import json request = requests.Session() sp_cookie = {...} #fill your shopee cookie was login. sp_csrf_token = '' #using csrf token in your cookie was login. request.cookies.update(sp_cookie) sp_header = {'referer': 'https://shopee.vn/', 'content-type': 'application/json', 'x-csrftoken' : sp_csrf_token, 'x-requested-with':'XMLHttpRequest', 'x-shopee-language':'vi'} request.headers.update(sp_header) payload1 = { "quantity":1, "checkout":True, "update_checkout_only":False, "donot_add_quantity":False, "source":"{\"refer_urls\":[]}", "add_on_deal_id":1132637, "client_source":1, "shopid":131195741, "itemid":6902964859, "modelid":8493121868, } response = request.post('https://shopee.vn/api/v2/cart/add_to_cart', data=json.dumps(payload1)) print(response) Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Công Dũng 4 Đã viết 11/12/2020 có bác nào kết nối websocket shopee bằng c# , em thấy cái websocket này khoai quá chưa bắt đầu từ đâu Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Nguyễn Tiến Quang 0 Đã viết 11/12/2020 Đỉnh quá thầy ơi Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Thiên Chi Kiều Nữ 959 Đã viết 11/12/2020 11 hours ago, Công Dũng said: có bác nào kết nối websocket shopee bằng c# , em thấy cái websocket này khoai quá chưa bắt đầu từ đâu bạn phải học websocket trước đã.. sau đó mới làm được cái này. Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Công Dũng 4 Đã viết 21/12/2020 On 11/12/2020 at 21:06, Thiên Chi Kiều Nữ said: bạn phải học websocket trước đã.. sau đó mới làm được cái này. em request lên shopee trong 1 khoảng thời gian nhiều request quá nên shopee nó chặn k cho request nữa Mỵ có giải pháp gì k giúp em với ạ Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Thiên Chi Kiều Nữ 959 Đã viết 21/12/2020 4 hours ago, Công Dũng said: em request lên shopee trong 1 khoảng thời gian nhiều request quá nên shopee nó chặn k cho request nữa Mỵ có giải pháp gì k giúp em với ạ thay ip khác nha em ...chặn thì phải thay thôi Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Công Dũng 4 Đã viết 22/12/2020 15 giờ trước, Thiên Chi Kiều Nữ said: thay ip khác nha em ...chặn thì phải thay thôi too_many_requestsToo Many Requests nó báo lỗi này Mỵ Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Thiên Chi Kiều Nữ 959 Đã viết 22/12/2020 1 hour ago, Công Dũng said: too_many_requestsToo Many Requests nó báo lỗi này Mỵ khó nhỉ =.='' thay cả user agent và reffrer luôn đi bạn Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites
Công Dũng 4 Đã viết 25/12/2020 On 22/12/2020 at 10:01, Thiên Chi Kiều Nữ said: khó nhỉ =.='' thay cả user agent và reffrer luôn đi bạn em thử cũng không được. em tìm hiểu mà cũng k biết Shopee nó chặn theo tiêu chí gì luôn Trích dẫn Chia sẻ bài đăng này Link tới bài viết Share on other sites