better title
This commit is contained in:
parent
36c1754725
commit
ed465c527f
1 changed files with 6 additions and 0 deletions
|
@ -39,6 +39,12 @@ def get_data(url):
|
|||
if 'title' in m:
|
||||
m['title'] = re.sub('(.*?) \(\d{4}\)$', '\\1', m['title'])
|
||||
|
||||
if not 'title' in m:
|
||||
match = re.compile("<title>.*?&(.*?)</title>").findall(data)
|
||||
if match:
|
||||
m['title'] = match[0].strip()
|
||||
if ' - ' in m['title']:
|
||||
m['title'] = m['title'].split(' - ', 1)[-1]
|
||||
match = re.compile("flashvars','file=(.*?.flv)'").findall(data)
|
||||
if match:
|
||||
m['flv'] = match[0]
|
||||
|
|
Loading…
Reference in a new issue