当前位置: > 热博

python 如何利用 for 回圈 印出table内所有 td值? 一起帮忙解决难题,拯救 IT 人的一 ...

时间:2022-04-19 21:29:18 热博 我要投稿

import requests from bs4 import BeautifulSoup payload = { "_EVENTTARGET":"", "._EVENTARGUMENT":"", "._LASTFOCUS":"", "._VIEWSTATEGENERATOR": "02BC70F4", "._SCROLLPOSITIONX": 0, "._SCROLLPOSITIONY": 791.2000122070312, "._VIEWSTATE":"/wEPDwUKMTU5MDY1ODkxMw9kFgJmD2QWAgIDD2QWAgIDD2QWCAIDDxBkDxYDZgIBAgIWAxAFA ihqAUBMGcQBQnntbHoqIjlnJYFATFnEAUN6KGoK e1seioiOWclgUBMmdkZAIHD2QWHAIBDxBkDxYaZgIBAgICAwIEAgUCBgIHAggCCQIKAgsCDAINAg4CDwIQAhECEgITAhQCFQIWAhcCGAIZFhoQBQQxOTk2BQQxOTk2ZxAFBDE5OTcFBDE5OTdnEAUEMTk5OAUEMTk5OGcQBQQxOTk5BQQxOTk5ZxAFBDIwMDAFBDIwMDBnEAUEMjAwMQUEMjAwMWcQBQQyMDAyBQQyMDAyZxAFBDIwMDMFBDIwMDNnEAUEMjAwNAUEMjAwNGcQBQQyMDA1BQQyMDA1ZxAFBDIwMDYFBDIwMDZnEAUEMjAwNwUEMjAwN2cQBQQyMDA4BQQyMDA4ZxAFBDIwMDkFBDIwMDlnEAUEMjAxMAUEMjAxMGcQBQQyMDExBQQyMDExZxAFBDIwMTIFBDIwMTJnEAUEMjAxMwUEMjAxM2cQBQQyMDE0BQQyMDE0ZxAFBDIwMTUFBDIwMTVnEAUEMjAxNgUEMjAxNmcQBQQyMDE3BQQyMDE3ZxAFBDIwMTgFBDIwMThnEAUEMjAxOQUEMjAxOWcQBQQyMDIwBQQyMDIwZxAFBDIwMjEFBDIwMjFnZGQCAw8QZA8WGmYCAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOAg8CEAIRAhICEwIUAhUCFgIXAhgCGRYaEAUEMTk5NgUEMTk5Nmc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9t112 wKWgCgUx 90LoKanCA5KPcWQfAgoH6KepdFYaEkToqLP8vQk/5Ct1SgLU UhCEm5dtO/aqHvneN02hRfoErusn7owDi/6EaUR99VWuBLGMeIbAuquA5IigBbI17Rxp7yuFkFI50Mb 9p3THIrOa9ncmClF8noovKG4awSV383ucXO68AYV4R/NAp0Mf1jseZzrICE kAHE9RDztg5LWrPrAa0v4eW005XcLM4j/U5VK680L6vSj5qzN4MKPJeqofGOT三秒knP5NH0RZEqt5a5rKR0Bz9DwotEEVtmE6nxaUjAgbDxxfUOMDkHeZxX3/MLwlCTvwl8r714CO5OwwWsOc0XcjVkWJGCLkFZo/JPVuewb9aXnZN9w6Xmoa1oyZxp76oo1zVd/0USzB8H7Akxx7SciDog/2wbZyWEALgAvCoBCEsGNw", "ctl00$ContentPlaceHolder_content$RadioButtonList_resultType": 0, "ctl00$ContentPlaceHolder_content$uc_timeSelector$DropDownList_startYear": 2021, "ctl00$ContentPlaceHolder_content$uc_timeSelector$DropDownList_endYear": 2021, "ctl00$ContentPlaceHolder_content$uc_timeSelector$time":"RadioButton_month", "ctl00$ContentPlaceHolder_content$uc_timeSelector$DropDownList_month_startYear": 2018, "ctl00$ContentPlaceHolder_content$uc_timeSelector$DropDownList_month_startMonth": 1, "ctl00$ContentPlaceHolder_content$uc_timeSelector$DropDownList_month_endYear": 2021, "ctl00$ContentPlaceHolder_content$uc_timeSelector$DropDownList_month_endMonth": 5, "ctl00$ContentPlaceHolder_content$uc_productList_mixVer$CheckBoxList_priceType$0": 1, "ctl00$ContentPlaceHolder_content$uc_productList_mixVer$CheckBoxList_productList_1_0$8": 13, "ctl00$ContentPlaceHolder_content$Button_query":"查看" } url = "http://price.naif.org.tw/Query/Query_now.aspx" headers = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"} resp = requests.post(url, data = payload) # 将 HTML 转成 BeautifulSoup 物品 soup = BeautifulSoup(resp.text, "html.parser") table = soup.find_all("table", {"id":"ContentPlaceHolder_content_GridView_data"}) print(table[0])

我运用上边程式码印出

****

時间
原产地大农场价钱
禽类
生鸡蛋

2018年1月45.35
2018年2月38.63
2018年3月38.58
2018年4月43.06
2018年5月46.32
2018年6月44.33
2018年7月47.34
2018年8月51.75
2018年9月55.39
2018年10月55.83
2018年11月55.83
2018年12月55.83
2019年1月57.93
2019年2月57.26
2019年3月59.87
2019年4月50.78
2019年5月44.17
2019年6月38.94
2019年7月37.39
2019年8月45.19
2019年9月45.50
2019年10月42.18
2019年11月46.17
2019年12月46.91
2020年1月39.22
2020年2月42.96
2020年3月48.84
2020年4月49.17
2020年5月44.92
2020年6月40.83
2020年7月38.47
2020年8月45.13
2020年9月46.78
2020年10月41.05
2020年11月43.72
2020年12月43.84
2021年1月45.67
2021年2月42.86
2021年3月51.48
2021年4月52.94
2021年5月46.69

我要将标粗这些td标值print出去

像那样展现

d = {"時间": ["2021年1月", "2021年2月"], "生鸡蛋原产地价钱(元/KG)": [45.67, 42.86]} df = pd.DataFrame(data = d) df 時间 生鸡蛋原产地价钱(元/KG) 0 2021年1月 45.67 1 2021年2月 42.86

我觉得运用for循坏来编写

我寻找这一段程式码能够 print下一笔td材料

egg = soup.find("td", text = "2018年1月").find_next_sibling("td").text

但是他的text需要立即打该值

i = soup.find("td", text = egg).find_next_sibling("td").text

若将text = egg,但egg是变化,这方式 会不成功,