I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 7569201b authored by str4d's avatar str4d
Browse files

Don't try and split a list metatag if it doesn't exist

parent 786e37f5
Branches
No related tags found
No related merge requests found
...@@ -109,6 +109,6 @@ def get_metadata_from_meta(meta): ...@@ -109,6 +109,6 @@ def get_metadata_from_meta(meta):
for metaTag in SUPPORTED_METATAGS: for metaTag in SUPPORTED_METATAGS:
metaLine = [s for s in metaLines if 'name="%s"' % metaTag in s] metaLine = [s for s in metaLines if 'name="%s"' % metaTag in s]
ret[metaTag] = metaLine[0].split('content="')[1].split('"')[0] if len(metaLine) > 0 else SUPPORTED_METATAGS[metaTag] ret[metaTag] = metaLine[0].split('content="')[1].split('"')[0] if len(metaLine) > 0 else SUPPORTED_METATAGS[metaTag]
if metaTag in LIST_METATAGS: if metaTag in LIST_METATAGS and ret[metaTag]:
ret[metaTag] = [s.strip() for s in ret[metaTag].split(',')] ret[metaTag] = [s.strip() for s in ret[metaTag].split(',')]
return ret return ret
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment