From 03c119155081f7b9f65e1f55d3a58708c9dc6704 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 15 Nov 2019 14:51:32 +0100 Subject: [PATCH] fall back to storyline for summary --- ox/web/imdb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 7d91dc7..2f14e33 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -199,6 +199,11 @@ class Imdb(SiteParser): 'summary': zebra_table('Plot Summary', more=[ '

(.*?)Storyline.*?

(.*?)

', + 'type': 'string' + }, 'posterId': { 'page': 'reference', 're': '', @@ -517,10 +522,13 @@ class Imdb(SiteParser): ]) if self['releasedate'] == 'x': del self['releasedate'] + + if 'summary' not in self and 'storyline' in self: + self['summary'] = self.pop('storyline') if 'summary' in self: if isinstance(self['summary'], list): self['summary'] = self['summary'][0] - self['summary'] = self['summary'].split('