You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to debug this and it looks like there is a KeyError thrown when trying to access the information for certain torrents.
I'm trying to grab the info on a torrent via this: info = torrents.info(torrentId=897966)
and I get the following error. It doesnt happen on all torrents though only some.
File "/Users/test.py", line 41, in download_from_1337x
info = torrents.info(torrentId=897966)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py1337x/py1337x.py", line 70, in info
return parser.infoParser(response, baseUrl=self.baseUrl)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py1337x/parser.py", line 67, in infoParser
images = [i['data-original'] for i in images.find_all('img')] if images else None
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py1337x/parser.py", line 67, in <listcomp>
images = [i['data-original'] for i in images.find_all('img')] if images else None
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/bs4/element.py", line 1406, in __getitem__
return self.attrs[key]
KeyError: 'data-original'
The text was updated successfully, but these errors were encountered:
Hi there,
I've been trying to debug this and it looks like there is a KeyError thrown when trying to access the information for certain torrents.
I'm trying to grab the info on a torrent via this:
info = torrents.info(torrentId=897966)
and I get the following error. It doesnt happen on all torrents though only some.
The text was updated successfully, but these errors were encountered: