aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-11-22 21:40:22 +0100
committerlonkaars <loek@pipeframe.xyz>2022-11-22 21:40:22 +0100
commitf2dab126f697589074acd41670040fdfc33c229f (patch)
tree1dfa775bd6a3a1ccaa4a9fe2cea0704a7a25c7e4
parent77a73c6a2fb01ecc3f6196a1675c6c19012ae988 (diff)
fix compatibility
-rw-r--r--shared.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared.py b/shared.py
index cd14a33..71a1330 100644
--- a/shared.py
+++ b/shared.py
@@ -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):