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()
|
title = title.lower()
|
||||||
if 'trailer' in title:
|
if 'trailer' in title:
|
||||||
return 'trailer'
|
return 'trailer'
|
||||||
|
if 'vcd' in title and 'cam' in title:
|
||||||
|
return 'vcd-cam'
|
||||||
if 'cam' in title:
|
if 'cam' in title:
|
||||||
return 'cam'
|
return 'cam'
|
||||||
if 'vcd' in title:
|
if 'vcd' in title:
|
||||||
return 'vcd'
|
return 'vcd'
|
||||||
for key in ('telesync', 'telecine', '.ts', '.tc', ' tc ', ' ts', 'ts-screener'):
|
for key in ('telecine', '.tc', ' tc '):
|
||||||
if key in title:
|
if key in title:
|
||||||
return 'telecine'
|
return 'telecine'
|
||||||
|
for key in ('telesync', '.ts', ' ts', 'ts-screener'):
|
||||||
|
if key in title:
|
||||||
|
return 'telesync'
|
||||||
for key in ('dvdrip', 'dvdscrs', 'dvdscr', 'dvd rip'):
|
for key in ('dvdrip', 'dvdscrs', 'dvdscr', 'dvd rip'):
|
||||||
if key in title:
|
if key in title:
|
||||||
return 'dvdrip'
|
return 'dvdrip'
|
||||||
|
for key in ('blu-ray rip', 'bdrip'):
|
||||||
|
if key in title:
|
||||||
|
return 'hdrip'
|
||||||
if 'screener' in title:
|
if 'screener' in title:
|
||||||
return 'screener'
|
return 'screener'
|
||||||
if 'xvid' in title:
|
|
||||||
return 'Xvid'
|
|
||||||
if '1080p' in title:
|
if '1080p' in title:
|
||||||
return '1080p'
|
return '1080p'
|
||||||
if '720p' in title:
|
if '720p' in title:
|
||||||
return '720p'
|
return '720p'
|
||||||
if 'dvdr' in title:
|
for key in ('dvdr', 'dvd-r'):
|
||||||
|
if key in title:
|
||||||
return 'DVDR'
|
return 'DVDR'
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,7 @@ def getInfo(piratebayID):
|
||||||
try:
|
try:
|
||||||
txt = read_url(url).decode('utf-8', 'replace')
|
txt = read_url(url).decode('utf-8', 'replace')
|
||||||
except URLError, e:
|
except URLError, e:
|
||||||
print e.errno
|
if e.code == 404:
|
||||||
if e.errno == 404:
|
|
||||||
return None
|
return None
|
||||||
title = re.compile('<title>(.*?) \(download torrent\) - TPB</title>').findall(txt)[0]
|
title = re.compile('<title>(.*?) \(download torrent\) - TPB</title>').findall(txt)[0]
|
||||||
movie = dict(
|
movie = dict(
|
||||||
|
|
Loading…
Reference in a new issue