trailer
This commit is contained in:
parent
482599169b
commit
d0c07ff222
1 changed files with 4 additions and 4 deletions
|
@ -274,7 +274,7 @@ class IMDb:
|
||||||
IMDbDict['release_date'] = self.parseReleaseinfo()
|
IMDbDict['release_date'] = self.parseReleaseinfo()
|
||||||
IMDbDict['business'] = self.parseBusiness()
|
IMDbDict['business'] = self.parseBusiness()
|
||||||
IMDbDict['reviews'] = self.parseExternalreviews()
|
IMDbDict['reviews'] = self.parseExternalreviews()
|
||||||
#IMDbDict['trailers'] = self.parseTrailers()
|
#IMDbDict['trailer'] = self.parseTrailer()
|
||||||
self.IMDbDict = IMDbDict
|
self.IMDbDict = IMDbDict
|
||||||
|
|
||||||
if IMDbDict['episode_of']:
|
if IMDbDict['episode_of']:
|
||||||
|
@ -495,14 +495,14 @@ class IMDb:
|
||||||
return ret
|
return ret
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def getTrailers(self, forcereload = False):
|
def getTrailer(self, forcereload = False):
|
||||||
if forcereload or not self.trailerSource:
|
if forcereload or not self.trailerSource:
|
||||||
self.trailerSource = read_url_utf8(self.trailerUrl)
|
self.trailerSource = read_url_utf8(self.trailerUrl)
|
||||||
return self.trailerSource
|
return self.trailerSource
|
||||||
|
|
||||||
def parseTrailers(self):
|
def parseTrailer(self):
|
||||||
ret = {}
|
ret = {}
|
||||||
soup = BeautifulSoup(self.getTrailers())
|
soup = BeautifulSoup(self.getTrailer())
|
||||||
for p in soup('p'):
|
for p in soup('p'):
|
||||||
if p('a') and p.firstText():
|
if p('a') and p.firstText():
|
||||||
a = p('a')[0]
|
a = p('a')[0]
|
||||||
|
|
Loading…
Reference in a new issue