some pormats
This commit is contained in:
parent
f24a6ae4e7
commit
2663c29e6b
2 changed files with 13 additions and 7 deletions
|
@ -34,25 +34,32 @@ def movieType(title):
|
|||
title = title.lower()
|
||||
if 'trailer' in title:
|
||||
return 'trailer'
|
||||
if 'vcd' in title and 'cam' in title:
|
||||
return 'vcd-cam'
|
||||
if 'cam' in title:
|
||||
return 'cam'
|
||||
if 'vcd' in title:
|
||||
return 'vcd'
|
||||
for key in ('telesync', 'telecine', '.ts', '.tc', ' tc ', ' ts', 'ts-screener'):
|
||||
for key in ('telecine', '.tc', ' tc '):
|
||||
if key in title:
|
||||
return 'telecine'
|
||||
for key in ('telesync', '.ts', ' ts', 'ts-screener'):
|
||||
if key in title:
|
||||
return 'telesync'
|
||||
for key in ('dvdrip', 'dvdscrs', 'dvdscr', 'dvd rip'):
|
||||
if key in title:
|
||||
return 'dvdrip'
|
||||
for key in ('blu-ray rip', 'bdrip'):
|
||||
if key in title:
|
||||
return 'hdrip'
|
||||
if 'screener' in title:
|
||||
return 'screener'
|
||||
if 'xvid' in title:
|
||||
return 'Xvid'
|
||||
if '1080p' in title:
|
||||
return '1080p'
|
||||
if '720p' in title:
|
||||
return '720p'
|
||||
if 'dvdr' in title:
|
||||
for key in ('dvdr', 'dvd-r'):
|
||||
if key in title:
|
||||
return 'DVDR'
|
||||
return ''
|
||||
|
||||
|
|
|
@ -132,8 +132,7 @@ def getInfo(piratebayID):
|
|||
try:
|
||||
txt = read_url(url).decode('utf-8', 'replace')
|
||||
except URLError, e:
|
||||
print e.errno
|
||||
if e.errno == 404:
|
||||
if e.code == 404:
|
||||
return None
|
||||
title = re.compile('<title>(.*?) \(download torrent\) - TPB</title>').findall(txt)[0]
|
||||
movie = dict(
|
||||
|
|
Loading…
Reference in a new issue