Skip to content

Commit

Permalink
Merge pull request #452 from brycied00d/patch-2
Browse files Browse the repository at this point in the history
Fix broken IMDB searching.
  • Loading branch information
RuudBurger committed Jun 20, 2012
2 parents 2cb84f0 + a265fca commit 806bed6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/imdb/parser/http/__init__.py
Expand Up @@ -424,7 +424,8 @@ def _get_search_content(self, kind, ton, results):
if isinstance(ton, unicode):
ton = ton.encode('utf-8')
##params = 'q=%s&%s=on&mx=%s' % (quote_plus(ton), kind, str(results))
params = 's=%s;mx=%s;q=%s' % (kind, str(results), quote_plus(ton))
##params = 's=%s;mx=%s;q=%s' % (kind, str(results), quote_plus(ton))
params = 's=%s&mx=%s&q=%s' % (kind, str(results), quote_plus(ton))
if kind == 'ep':
params = params.replace('s=ep;', 's=tt;ttype=ep;', 1)
cont = self._retrieve(imdbURL_find % params)
Expand All @@ -434,7 +435,8 @@ def _get_search_content(self, kind, ton, results):
return cont
# The retrieved page contains no results, because too many
# titles or names contain the string we're looking for.
params = 's=%s;q=%s;lm=0' % (kind, quote_plus(ton))
##params = 's=%s;q=%s;lm=0' % (kind, quote_plus(ton))
params = 's=%s&q=%s&lm=0' % (kind, quote_plus(ton))
size = 22528 + results * 512
return self._retrieve(imdbURL_find % params, size=size)

Expand Down

0 comments on commit 806bed6

Please sign in to comment.