diff --git a/oxdata/lookup/models.py b/oxdata/lookup/models.py index 1420a3d..5017bb7 100644 --- a/oxdata/lookup/models.py +++ b/oxdata/lookup/models.py @@ -151,20 +151,30 @@ class MovieId(models.Model): def links(self): links = [] if self.imdb_id: - links.append({'source': 'IMDb', - 'url': ox.web.imdb.get_url(self.imdb_id)}) + links.append({ + 'source': 'IMDb', + 'url': ox.web.imdb.get_url(self.imdb_id) + }) if self.wikipedia_id: - links.append({'source': 'Wikipedia', - 'url': ox.web.wikipedia.get_url(self.wikipedia_id)}) + links.append({ + 'source': 'Wikipedia', + 'url': ox.web.wikipedia.get_url(self.wikipedia_id).replace('http://', 'https://') + }) if self.criterion_id: - links.append({'source': 'Criterion', - 'url': ox.web.criterion.get_url(self.criterion_id)}) + links.append({ + 'source': 'Criterion', + 'url': ox.web.criterion.get_url(self.criterion_id) + }) if self.archiveorg_id: - links.append({'source': 'Internet Archive', - 'url': ox.web.archive.get_url(self.archiveorg_id)}) + links.append({ + 'source': 'Internet Archive', + 'url': ox.web.archive.get_url(self.archiveorg_id).replace('http://', 'https://') + }) qs = u'"%s (%s)"'%(self.title, self.year) - links.append({'source': 'Google', - 'url': 'http://google.com/search?q=%s' % quote(qs.encode('utf-8'))}) + links.append({ + 'source': 'Google', + 'url': 'https://google.com/search?q=%s' % quote(qs.encode('utf-8')) + }) return links def info(self, key):