Better variable naming
Thanks to DxCx
This commit is contained in:
1 parent
a6f9ad6330
commit
224d1527e1
19 files changed
+96
-95
No files matched your search
@@ -3,7 +3,7 @@ import xml.etree.ElementTree as XMLTree
|
||||
|
||||
log = CPLog(__name__)
|
||||
|
||||
class RSS():
|
||||
class RSS(object):
|
||||
|
||||
def getTextElements(self, xml, path):
|
||||
''' Find elements and return tree'''
|
||||
|
||||
@@ -67,10 +67,9 @@ def getImdb(txt):
|
||||
output.close()
|
||||
|
||||
try:
|
||||
m = re.search('(?P<id>tt[0-9{7}]+)', txt)
|
||||
id = m.group('id')
|
||||
if id: return id
|
||||
except AttributeError:
|
||||
id = re.findall('imdb\.com\/title\/tt(\d{7})', txt)[0]
|
||||
return id
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user