diff --git a/scrapeit/imdb.py b/scrapeit/imdb.py index f01b976..8ffadb9 100644 --- a/scrapeit/imdb.py +++ b/scrapeit/imdb.py @@ -249,6 +249,7 @@ class IMDb: IMDbDict['release_date'] = self.parseReleaseinfo() IMDbDict['business'] = self.parseBusiness() IMDbDict['reviews'] = self.parseExternalreviews() + IMDbDict['stills'] = getMovieStills(self.imdb) #IMDbDict['trailer'] = self.parseTrailer() self.IMDbDict = IMDbDict @@ -558,7 +559,21 @@ def getEpisodeData(title, episode, show_url = None): episodeData['description'] = i['episodes'][episode]['description'] episodeData['imdb'] = i['episodes'][episode]['imdb'] return episodeData - + +def getMovieStills(id): + data = read_url("http://imdb.com/gallery/ss/%s" % id) + s_ = re.compile(''' int(s[1]): + stills.append("http://i.imdb.com/Photos/Ss/%s/%s.jpg" % (id, s[2])) + if not stills: + s_ = re.compile(''' int(s[1]): + stills.append("http://%sf.jpg" % s[2]) + return stills if __name__ == '__main__': import sys