adding some tests
This commit is contained in:
parent
e34f222e54
commit
bf29d8fc5d
2 changed files with 14 additions and 0 deletions
|
@ -11,6 +11,16 @@ def getId(url):
|
|||
return url.split("/")[-2]
|
||||
|
||||
def getData(id):
|
||||
'''
|
||||
>>> getData('129689')['cast'][1][1]
|
||||
u'Marianne'
|
||||
>>> getData('129689')['credits'][0][0]
|
||||
u'Jean-Luc Godard'
|
||||
>>> getData('129689')['posters'][0]
|
||||
u'http://image.allmusic.com/00/adg/cov200/dru800/u812/u81260bbffr.jpg'
|
||||
>>> getData('129689')['rating']
|
||||
u'4.5'
|
||||
'''
|
||||
data = {
|
||||
"url": getUrl(id)
|
||||
}
|
||||
|
|
|
@ -7,6 +7,10 @@ from oxlib.cache import getUrlUnicode
|
|||
from oxlib import findRe
|
||||
|
||||
def getData(id):
|
||||
'''
|
||||
>>> getData('0060304')['posters'][0]
|
||||
u'http://www.movieposterdb.com/posters/06_03/1967/0060304/l_99688_0060304_639fdd1e.jpg'
|
||||
'''
|
||||
data = {
|
||||
"url": getUrl(id)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue