diff options
-rw-r--r-- | shared.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7,7 +7,7 @@ from bs4 import BeautifulSoup def get_public_key(): data = urllib.request.urlopen("https://www.ns.nl/reisplanner").read() soup = BeautifulSoup(data, features="lxml") - data = "\n".join(map(lambda x: x.text, soup.select('script:-soup-contains("mlabProductKey")'))) + data = "\n".join(str(x) for x in soup.select('script:-soup-contains("mlabProductKey")')) return re.search(r'mlabProductKey: "([0-9a-f]{32})"', data).group(1) def read_file(filename): |