【问题标题】:how to parse an HTML/PHP web-page to get the content of the table using python [closed]如何使用 python 解析 HTML/PHP 网页以获取表格的内容 [关闭]
【发布时间】:2022-08-02 17:02:04
【问题描述】:

我需要从http://www.o1vsk.lv/index.php/stundu-izmainas 页面获取表格的内容并创建一个用于 6.d 类的表格,使其看起来像一张表格。 我努力了。

import requests
import pandas

res = requests.post(\'http://www.o1vsk.lv/index.php/stundu-izmainas\', data={\'page\': \'1\'})
html = pandas.read_html(res.content)
print(res)
print(html)
  • 如果有人知道请写

标签: python php html


【解决方案1】:

要浏览 HTML,我建议使用 BeautifulSoup 库并搜索 <table> 标签

【讨论】:

  • 你解决了吗?
猜你喜欢
  • 1970-01-01
  • 2013-04-23
  • 2011-01-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-16
  • 1970-01-01
  • 2022-08-18
相关资源
最近更新 更多