Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xml.etree.ElementTree as ET
- import requests
- response = requests.get('https://pgedystrybucja.pl/planowanewylaczenia/wylaczenia/Mi%C5%84sk-Mazowiecki')
- fixedText = response.text.replace("<td style>", "<td>").replace("<br>", "").replace("<br />", "").replace("</table>", "</tbody></table>")
- tree = ET.fromstring(fixedText)
- for tr in tree[0][1]:
- if len(tr) > 1:
- print(tr[4].text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement