[allocine] remove excessive quote_plus call on pattern to make multi-word search work again
This commit is contained in:
parent
88df613a53
commit
29738edd29
2 changed files with 4 additions and 6 deletions
|
|
@ -22,8 +22,6 @@ from weboob.tools.backend import Module
|
||||||
|
|
||||||
from .browser import AllocineBrowser
|
from .browser import AllocineBrowser
|
||||||
|
|
||||||
from urllib import quote_plus
|
|
||||||
|
|
||||||
__all__ = ['AllocineModule']
|
__all__ = ['AllocineModule']
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -43,10 +41,10 @@ class AllocineModule(Module, CapCinema):
|
||||||
return self.browser.get_person(id)
|
return self.browser.get_person(id)
|
||||||
|
|
||||||
def iter_movies(self, pattern):
|
def iter_movies(self, pattern):
|
||||||
return self.browser.iter_movies(quote_plus(pattern.encode('utf-8')))
|
return self.browser.iter_movies(pattern.encode('utf-8'))
|
||||||
|
|
||||||
def iter_persons(self, pattern):
|
def iter_persons(self, pattern):
|
||||||
return self.browser.iter_persons(quote_plus(pattern.encode('utf-8')))
|
return self.browser.iter_persons(pattern.encode('utf-8'))
|
||||||
|
|
||||||
def iter_movie_persons(self, id, role=None):
|
def iter_movie_persons(self, id, role=None):
|
||||||
return self.browser.iter_movie_persons(id, role)
|
return self.browser.iter_movie_persons(id, role)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class AllocineTest(BackendTest):
|
||||||
MODULE = 'allocine'
|
MODULE = 'allocine'
|
||||||
|
|
||||||
def test_search_movie(self):
|
def test_search_movie(self):
|
||||||
movies = list(self.backend.iter_movies('spiderman'))
|
movies = list(self.backend.iter_movies('usual suspects'))
|
||||||
assert len(movies) > 0
|
assert len(movies) > 0
|
||||||
for movie in movies:
|
for movie in movies:
|
||||||
assert movie.id
|
assert movie.id
|
||||||
|
|
@ -37,7 +37,7 @@ class AllocineTest(BackendTest):
|
||||||
assert movie.original_title
|
assert movie.original_title
|
||||||
|
|
||||||
def test_search_person(self):
|
def test_search_person(self):
|
||||||
persons = list(self.backend.iter_persons('dewaere'))
|
persons = list(self.backend.iter_persons('patrick dewaere'))
|
||||||
assert len(persons) > 0
|
assert len(persons) > 0
|
||||||
for person in persons:
|
for person in persons:
|
||||||
assert person.id
|
assert person.id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue