Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Lykke committed Aug 14, 2023
1 parent 052ff2e commit 185c0d0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/NativeAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,11 @@ def __get_idk(self, soup):
scripts = soup.find_all('script')
for script in scripts:
if script.string and 'window._IDK' in script.string:
print(script.string)
try:
idk_txt = '{'+re.search(r'\{(.*)\}',
script.string, re.M | re.S).group(1)+'}'
idk_txt = re.sub(
r'([\{\s,])(\w+)(:)', r'\1"\2"\3', idk_txt.replace('\'', '"'))
print(idk_txt)
idk = yaml.load(idk_txt, Loader=yaml.FullLoader)
return idk
except json.decoder.JSONDecodeError:
Expand Down

0 comments on commit 185c0d0

Please sign in to comment.