暖茶网
WarmTea.com
当前位置: 主页 > 免费发布 >

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

好评:7379 次
import requests from bs4 import BeautifulSoup payload = { '_EVENTTARGET':'', '._EVENTARGUMENT':'', '._LASTFOCUS':'', '._VIEWSTATEGENERATOR': '02BC70F4', '._SCROLLPOSITIONX': 0, '._SCROLLPOSITIONY': 791.2000122070312, '._VIEWSTATE':'/wEPDwUKMTU5MDY1ODkxMw9kFgJmD2QWAgIDD2QWAgIDD2QWCAIDDxBkDxYDZgIBAgIWAxAFA ihqAUBMGcQBQnntbHoqIjlnJYFATFnEAUN6KGoK e1seioiOWclgUBMmdkZAIHD2QWHAIBDxBkDxYaZgIBAgICAwIEAgUCBgIHAggCCQIKAgsCDAINAg4CDwIQAhECEgITAhQCFQIWAhcCGAIZFhoQBQQxOTk2BQQxOTk2ZxAFBDE5OTcFBDE5OTdnEAUEMTk5OAUEMTk5OGcQBQQxOTk5BQQxOTk5ZxAFBDIwMDAFBDIwMDBnEAUEMjAwMQUEMjAwMWcQBQQyMDAyBQQyMDAyZxAFBDIwMDMFBDIwMDNnEAUEMjAwNAUEMjAwNGcQBQQyMDA1BQQyMDA1ZxAFBDIwMDYFBDIwMDZnEAUEMjAwNwUEMjAwN2cQBQQyMDA4BQQyMDA4ZxAFBDIwMDkFBDIwMDlnEAUEMjAxMAUEMjAxMGcQBQQyMDExBQQyMDExZxAFBDIwMTIFBDIwMTJnEAUEMjAxMwUEMjAxM2cQBQQyMDE0BQQyMDE0ZxAFBDIwMTUFBDIwMTVnEAUEMjAxNgUEMjAxNmcQBQQyMDE3BQQyMDE3ZxAFBDIwMTgFBDIwMThnEAUEMjAxOQUEMjAxOWcQBQQyMDIwBQQyMDIwZxAFBDIwMjEFBDIwMjFnZGQCAw8QZA8WGmYCAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOAg8CEAIRAhICEwIUAhUCFgIXAhgCGRYaEAUEMTk5NgUEMT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KhPZ9t112 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])

我运用上边程式码印出

<table align="Center" border="1" cellspacing="0" class="queryBoxNew" id="ContentPlaceHolder_content_GridView_data" rules="all" width="100%"> <tr> <th rowspan="3"><div style="max-width:141080x;min-width:100%;">時间</div></th><th colspan="1">原产地大农场价钱</th> </tr><tr> <th colspan="1">禽类</th> </tr><tr> <th><div style="max-width:120px;min-width:100%;">生鸡蛋</div></th> </tr>**<tr> <td>2018年1月</td><td>45.35</td> </tr><tr> <td>2018年2月</td><td>38.63</td> </tr><tr> <td>2018年3月</td><td>38.58</td> </tr><tr> <td>2018年4月</td><td>43.06</td> </tr><tr> <td>2018年5月</td><td>46.32</td> </tr><tr> <td>2018年6月</td><td>44.33</td> </tr><tr> <td>2018年7月</td><td>47.34</td> </tr><tr> <td>2018年8月</td><td>51.75</td> </tr><tr> <td>2018年9月</td><td>55.39</td> </tr><tr> <td>2018年10月</td><td>55.83</td> </tr><tr> <td>2018年11月</td><td>55.83</td> </tr><tr> <td>2018年12月</td><td>55.83</td> </tr><tr> <td>2019年1月</td><td>57.93</td> </tr><tr> <td>2019年2月</td><td>57.26</td> </tr><tr> <td>2019年3月</td><td>59.87</td> </tr><tr> <td>2019年4月</td><td>50.78</td> </tr><tr> <td>2019年5月</td><td>44.17</td> </tr><tr> <td>2019年6月</td><td>38.94</td> </tr><tr> <td>2019年7月</td><td>37.39</td> </tr><tr> <td>2019年8月</td><td>45.19</td> </tr><tr> <td>2019年9月</td><td>45.50</td> </tr><tr> <td>2019年10月</td><td>42.18</td> </tr><tr> <td>2019年11月</td><td>46.17</td> </tr><tr> <td>2019年12月</td><td>46.91</td> </tr><tr> <td>2020年1月</td><td>39.22</td> </tr><tr> <td>2020年2月</td><td>42.96</td> </tr><tr> <td>2020年3月</td><td>48.84</td> </tr><tr> <td>2020年4月</td><td>49.17</td> </tr><tr> <td>2020年5月</td><td>44.92</td> </tr><tr> <td>2020年6月</td><td>40.83</td> </tr><tr> <td>2020年7月</td><td>38.47</td> </tr><tr> <td>2020年8月</td><td>45.13</td> </tr><tr> <td>2020年9月</td><td>46.78</td> </tr><tr> <td>2020年10月</td><td>41.05</td> </tr><tr> <td>2020年11月</td><td>43.72</td> </tr><tr> <td>2020年12月</td><td>43.84</td> </tr><tr> <td>2021年1月</td><td>45.67</td> </tr><tr> <td>2021年2月</td><td>42.86</td> </tr><tr> <td>2021年3月</td><td>51.48</td> </tr><tr> <td>2021年4月</td><td>52.94</td> </tr><tr> <td>2021年5月</td><td>46.69</td> </tr>** </table>

我要将标粗这些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是变化,这方式 会不成功,

有哪些麽方式 能够 一直print出td的值,
感谢!

顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
表情:
用户名: 验证码:点击我更换图片
最新评论
推荐内容