Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from lxml import etree
- import requests
- resp = requests.get('http://www.1sg.sk/index.php?id=1110&node=0&datum=2019-05-24')
- # resp.content je typu string
- html = etree.HTML(resp.content)
- # tabulky je zoznam vsetkych tabuliek
- tabulky = html.xpath('//table')
- for t in tabulky:
- t.getparent().remove(t)
- print(etree.tostring(html))
Advertisement
Add Comment
Please, Sign In to add comment