Advertisement
314ma

PGE

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