better var names
This commit is contained in:
parent
70a610dc4f
commit
24018d70c0
1 changed files with 10 additions and 10 deletions
|
@ -7,16 +7,16 @@ from oxlib import stripTags, findRe
|
|||
from oxlib.cache import getUrlUnicode
|
||||
|
||||
def getMovieData(amgId):
|
||||
data = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=%s~T0" % amgId)
|
||||
r = {}
|
||||
r['poster'] = findRe(data, '<img src="(http://image.*?)"')
|
||||
r['synopsis'] = stripTags(findRe(data, 'Plot Synopsis</td>.*?<td colspan="2"><p>(.*?)</td>'))
|
||||
r['year'] = findRe(data, '<a href="/cg/avg.dll\?p=avg&sql=24:\d{4}">(\d{4})</a>')
|
||||
r['rating'] = findRe(data, '" alt="(\d+?) Stars"')
|
||||
r['country'] = findRe(data, '<a href="/cg/avg.dll\?p=avg&sql=24:D\|\|\|206">(.*?)</')
|
||||
data = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=%s~T1" % amgId)
|
||||
r['review'] = stripTags(findRe(data, 'Review</td>.*?<td colspan="2"><p>(.*?)</td>'))
|
||||
return r
|
||||
html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=%s~T0" % amgId)
|
||||
data = {}
|
||||
data['poster'] = findRe(html, '<img src="(http://image.*?)"')
|
||||
data['synopsis'] = stripTags(findRe(html, 'Plot Synopsis</td>.*?<td colspan="2"><p>(.*?)</td>'))
|
||||
data['year'] = findRe(html, '<a href="/cg/avg.dll\?p=avg&sql=24:\d{4}">(\d{4})</a>')
|
||||
data['rating'] = findRe(html, '" alt="(\d+?) Stars"')
|
||||
data['country'] = findRe(html, '<a href="/cg/avg.dll\?p=avg&sql=24:D\|\|\|206">(.*?)</')
|
||||
html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=%s~T1" % amgId)
|
||||
data['review'] = stripTags(findRe(html, 'Review</td>.*?<td colspan="2"><p>(.*?)</td>'))
|
||||
return data
|
||||
|
||||
def getMoviePoster(amgId):
|
||||
data = getMovieData(amgId)
|
||||
|
|
Loading…
Reference in a new issue