not all archive.org links have a title
This commit is contained in:
parent
fdbf18980f
commit
f3787c7412
1 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,8 @@ def getWikiData(wikipediaUrl):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def getMovieData(wikipediaUrl):
|
def getMovieData(wikipediaUrl):
|
||||||
if not wikipediaUrl.startswith('http'): wikipediaUrl = getUrl(wikipediaUrl)
|
if not wikipediaUrl.startswith('http'):
|
||||||
|
wikipediaUrl = getUrl(wikipediaUrl)
|
||||||
data = getWikiData(wikipediaUrl)
|
data = getWikiData(wikipediaUrl)
|
||||||
filmbox_data = findRe(data, '''\{\{[Ii]nfobox.[Ff]ilm(.*?)\n\}\}''')
|
filmbox_data = findRe(data, '''\{\{[Ii]nfobox.[Ff]ilm(.*?)\n\}\}''')
|
||||||
filmbox = {}
|
filmbox = {}
|
||||||
|
@ -80,7 +81,7 @@ def getMovieData(wikipediaUrl):
|
||||||
if r:
|
if r:
|
||||||
filmbox['imdb_id'] = r[0]
|
filmbox['imdb_id'] = r[0]
|
||||||
|
|
||||||
r = re.compile('{{Internet Archive.*?\|id=(.*?)\|', re.IGNORECASE).findall(data)
|
r = re.compile('{{Internet Archive.*?\|id=(.*?)[\|}]', re.IGNORECASE).findall(data)
|
||||||
if r:
|
if r:
|
||||||
filmbox['archiveorg_id'] = r[0]
|
filmbox['archiveorg_id'] = r[0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue