1. Html網頁結構介紹-網頁到底如何傳送資料?爬蟲必學
2. 資料傳遞:Get與Post差異,網路封包傳送的差異
3. Html爬蟲Get教學-抓下Yahoo股票資訊,程式交易的第一步
4. Html爬蟲Get實戰-全台最大美食平台FoodPanda爬蟲,把熊貓抓回家
5. 資料分析實戰,熊貓FoodPanda熱門美食系列|看出地區最火料理種類
6. Json爬蟲教學-Google趨勢搜尋|掌握最火關鍵字
7. Json爬蟲實戰-24小時電商PChome爬蟲|雖然我不是個數學家但這聽起來很不錯吧
8. Html爬蟲Post教學-台灣股市資訊|網韭菜們的救星
9. Html爬蟲Post實戰-全球美食平台UberEat爬蟲
10. Pandas爬蟲教學-Yahoo股市爬蟲|不想再盯盤
11. Pandas爬蟲實戰-爬下全台各地區氣象預報歷史資料
12. 資料分析實戰-天氣預報圖像化|一張圖巧妙躲過雨季
Uberï¼åªæ¥ï¼æç«æ¼è¥¿å 2009å¹´3æï¼ä¸¦ææ©å¨è¥¿å 2010å¹´æ¨åºæåï¼åµè¾¦äººçºæ ¼çç¹Â·åæ®ï¼Garrett Campï¼èå´ç¶æ¯Â·å¡èå°¼å ï¼Travis Cordell Kalanickï¼ï¼ç®å總é¨ä½æ¼ç¾åå å©ç¦å°¼äºå·èéå±±ãè¿å¹´ Uber çå°äºç¾é£å¤éå¸å ´ï¼ç©æ¥µæ¨åUber Eatsï¼èå¨å°ç£ Uber Eats ç®åå·²ç¶æ¯åä¸å¤§çç¾é£å¤éå¹³å°ï¼å¢åä¸å®¹å°è¦·ã
ç¾å¨å°ç£å¤§å¤é¤é£²æ¥é½æèUberåä½ï¼å°¤å ¶å¨2019å¹´æ°å èºçï¼COVID-19ï¼çæ å¢ä¸ï¼Uber Eats çç¢å¼æ°´æ¼²è¹é«ï¼å¨è¶³ä¸åºæ¶çç«æ æ æ³ä¸ï¼å¤éå¹³å°ç«æäºé¤é£²æ¥çãå¯ä¸éè·¯ãï¼å æ¤èç± Uber Eats è³æè½å¤ æ¢è¨ªæ¯åå°åçé¤é£²æ æ³åå¸ã
ä½ å¿ é å ç¥éï¼è³æå³éGetèPostå·®ç°
æ¬èª²ç¨ä½¿ç¨requestçå¥ä»¶é²è¡è«æ±ï¼æ¯ä½¿ç¨Postçå½¢å¼å³é headersè data ï¼èå¨èª²ç¨ä¸æé¤æäºè¨±å¤ä¸éè¦å³éçè³æï¼
# è«æ±é帶çè³æ
post_head = {
# 'accept': '*/*',
# 'accept-encoding': 'gzip, deflate, br',
# 'accept-language': 'en-US,en;q=0.9,zh-TW;q=0.8,zh;q=0.7',
# 'content-length': '911',
# 'content-type': 'application/json',
'cookie': 'dId=4815da68-ec54-41d4-97...太å¤äºï¼è©³æ
è«ä¸è¼ç¨å¼ç¢¼',
# 'dnt': '1',
# 'origin': 'https://www.ubereats.com',
# 'referer': 'https://www.ubereats.com/tw/feed?pl=JTdCJTIyYWRkcmVzcyUyMiU...太å¤äºï¼è©³æ
è«ä¸è¼ç¨å¼ç¢¼',
# 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"',
# 'sec-ch-ua-mobile': '?0',
# 'sec-fetch-dest': 'empty',
# 'sec-fetch-mode': 'cors',
# 'sec-fetch-site': 'same-origin',
# 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36',
'x-csrf-token': 'x',
# 'x-uber-xps': '%7B%22eats_web_promo_...太å¤äºï¼è©³æ
è«ä¸è¼ç¨å¼ç¢¼'
}
post_data = {
# 'billboardUuid': "",
'cacheKey': "JTdCJTIyYWRkcmVzcyUyMiUzQSUyMiVFNSVCQiVCQSVFNSU5QyU4QiVFNSU4QyU5NyVFOCVCNyVBRiVFNCVCOCU4MCVFNiVBRSVCNTIyJUU4JTk5JTlGJTIyJTJDJTIycmVmZXJlbmNlJTIyJTNBJTIyRWxST2J5NGdNaklzSUZObFkzUnBiMjRnTVN3Z1NtbGhibWQxYnlCT2IzSjBhQ0JTYjJGa0xDQmFhRzl1WjNOb1lXNGdSR2x6ZEhKcFkzUXNJRlJoYVhCbGFTQkRhWFI1TENCVVlXbDNZVzRnTVRBME9URWlVQkpPQ2pRS01nblRkLTE2WXFsQ05CRkFfb2FTeDg1WE9ob2VDeER1d2U2aEFSb1VDaElKbTJ3dFh2bXJRalFSZGNlY2U0ZjZHczRNRUJZcUZBb1NDU3NmeFA1aHFVSTBFUXhfa2RRNFJlU1QlMjIlMkMlMjJyZWZlcmVuY2VUeXBlJTIyJTNBJTIyZ29vZ2xlX3BsYWNlcyUyMiUyQyUyMmxhdGl0dWRlJTIyJTNBMjUuMDQ2ODYxMSUyQyUyMmxvbmdpdHVkZSUyMiUzQTEyMS41MzY0MjYlN0Q=/DELIVERY///0/0//JTVCJTVE///",
# 'carouselId': "",
# 'date': "",
# 'endTime': '0',
# 'feedProvider': "",
# 'feedSessionCount': {'announcementCount': '0', 'announcementLabel': ""},
# 'getFeedItemType': "PINNED",
# 'marketingFeedType': "",
# 'showSearchNoAddress': False,
# 'sortAndFilters': [],
# 'startTime': '0',
# 'userQuery': ""
}
Uber Eats ç網ç«ä¸åªæ檢æ¥hearderï¼ä¸»è¦æ檢æ¥data 裡é¢çcacheKey åæ¸ï¼éè¦å ©è çææè½é²è¡è«æ±ã
#è«æ±ç¶²ç«
list_req = requests.post(url,
headers = post_head,
data = post_data)
getdata = json.loads(list_req.content)
作者:楊超霆 行銷搬進大程式 創辦人