import requests
import pandas as pd
url = 'http://jenml09.jobs:8090/view/SAT/job/SAT_ENC_STATUS/HTML_Report'
html = requests.get(url).content
df_list = pd.read_html(url,header= 0)
df = df_list[-1]
print html
预期结果:
Enclosure Imported IP Environment View Build
sAt7010 No None Main
sAt7012 Yes 16.71.131.69 Main 5.00.00-0396983
sAt7013 Yes 16.71.123.31 Main None
sAt7014 Yes 16.71.130.35 Main 5.10.00-JENK
实际结果:
File "C:\Python27\lib\site-packages\pandas\io\html.py", line 1094, in read_html
displayed_only=displayed_only)
File "C:\Python27\lib\site-packages\pandas\io\html.py", line 916, in _parse
raise_with_traceback(retained)
File "C:\Python27\lib\site-packages\pandas\io\html.py", line 898, in _parse
tables = p.parse_tables()
File "C:\Python27\lib\site-packages\pandas\io\html.py", line 221, in parse_tables
tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
File "C:\Python27\lib\site-packages\pandas\io\html.py", line 551, in _parse_tables
raise ValueError('No tables found')
ValueError: No tables found
html来源
<iframe id="myframe" height="100%" width="100%"
frameborder="0" src="testenv_simple.html" style="height: 939px;">
</iframe>
在testenv_simple.html
中,我需要访问表。
您的帖子似乎主要是代码;请添加更多详细信息。