fork download
  1. from lxml import html
  2. import requests
  3.  
  4. page = requests.get('http://s...content-available-to-author-only...g.net/key/L7815')
  5. tree = html.fromstring(page.content)
  6.  
  7. table = tree.xpath('/html/body/center/div[1]/center/table[3]/tbody')[0].findall('tr')
  8. data = list()
  9.  
  10.  
  11. for row in table:
  12. data.append([c.text for c in row.getchildren()])
  13.  
  14. print(data)
Runtime error #stdin #stdout #stderr 0.05s 18124KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 2, in <module>
ImportError: No module named 'requests'