From 96829cb906cdc5076ebbe7c5542c149a4cb4f05a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 9 Aug 2007 10:41:54 +0000 Subject: [PATCH] get country and language from parent if not available --- scrapeit/imdb.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scrapeit/imdb.py b/scrapeit/imdb.py index c4ca0d5..b4fb0dc 100644 --- a/scrapeit/imdb.py +++ b/scrapeit/imdb.py @@ -263,6 +263,12 @@ class IMDb: IMDbDict['release_date'] = self.parseReleaseinfo() IMDbDict['business'] = self.parseBusiness() self.IMDbDict = IMDbDict + + if IMDbDict['episode_of']: + episode_of =IMDb(IMDbDict['episode_of']).parse() + for key in ('country', 'language'): + if not IMDbDict[key]: + IMDbDict[key] = episode_of[key] return self.IMDbDict def getCredits(self, forcereload = False):