fix unicode issues
This commit is contained in:
parent
f603c44d6c
commit
8155b0b289
10 changed files with 11 additions and 11 deletions
|
|
@ -60,6 +60,6 @@ class ArteBrowser(BaseBrowser):
|
|||
if not pattern:
|
||||
self.home()
|
||||
else:
|
||||
self.location(self.buildurl('/%s/do_search/videos/%s' % (self.lang, self.SEARCH_LANG[self.lang]), q=pattern))
|
||||
self.location(self.buildurl('/%s/do_search/videos/%s' % (self.lang, self.SEARCH_LANG[self.lang]), q=pattern.encode('utf-8')))
|
||||
assert self.is_on_page(IndexPage)
|
||||
return self.page.iter_videos()
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class CanalplusBrowser(BaseBrowser):
|
|||
self.location('http://service.canal-plus.com/video/rest/initPlayer/cplus/')
|
||||
|
||||
def iter_search_results(self, pattern):
|
||||
self.location('http://service.canal-plus.com/video/rest/search/cplus/' + urllib.quote_plus(pattern))
|
||||
self.location('http://service.canal-plus.com/video/rest/search/cplus/' + urllib.quote_plus(pattern.encode('utf-8')))
|
||||
return self.page.iter_results()
|
||||
|
||||
@id2url(CanalplusVideo.id2url)
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ class DailymotionBrowser(BaseBrowser):
|
|||
self.home()
|
||||
else:
|
||||
if sortby is None:
|
||||
url = '/search/%s/1' % quote_plus(pattern)
|
||||
url = '/search/%s/1' % quote_plus(pattern.encode('utf-8'))
|
||||
else:
|
||||
url = '/%s/search/%s/1' % (sortby, quote_plus(pattern))
|
||||
url = '/%s/search/%s/1' % (sortby, quote_plus(pattern.encode('utf-8')))
|
||||
self.location(url)
|
||||
|
||||
assert self.is_on_page(IndexPage)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class GazelleBrowser(BaseBrowser):
|
|||
return self.location('%s://%s/login.php' % (self.PROTOCOL, self.DOMAIN))
|
||||
|
||||
def iter_torrents(self, pattern):
|
||||
self.location(self.buildurl('/torrents.php', searchstr=pattern))
|
||||
self.location(self.buildurl('/torrents.php', searchstr=pattern.encode('utf-8')))
|
||||
|
||||
assert self.is_on_page(TorrentsPage)
|
||||
return self.page.iter_torrents()
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@ class InaBrowser(BaseBrowser):
|
|||
return self.page.get_video(video)
|
||||
|
||||
def iter_search_results(self, pattern):
|
||||
self.location(self.buildurl('/recherche/recherche', search=pattern))
|
||||
self.location(self.buildurl('/recherche/recherche', search=pattern.encode('utf-8')))
|
||||
assert self.is_on_page(SearchPage)
|
||||
return self.page.iter_videos()
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class IsohuntBrowser(BaseBrowser):
|
|||
return self.location('https://isohunt.com')
|
||||
|
||||
def iter_torrents(self, pattern):
|
||||
self.location('https://isohunt.com/torrents/%s?iht=-1&ihp=1&ihs1=1&iho1=d' % pattern)
|
||||
self.location('https://isohunt.com/torrents/%s?iht=-1&ihp=1&ihs1=1&iho1=d' % pattern.encode('utf-8'))
|
||||
assert self.is_on_page(TorrentsPage)
|
||||
return self.page.iter_torrents()
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class KickassBrowser(BaseBrowser):
|
|||
return self.location('http://kickasstorrents.com')
|
||||
|
||||
def iter_torrents(self, pattern):
|
||||
self.location('http://fr.kickasstorrents.com/new/?q=%s&field=seeders&sorder=desc' % pattern)
|
||||
self.location('http://fr.kickasstorrents.com/new/?q=%s&field=seeders&sorder=desc' % pattern.encode('utf-8'))
|
||||
assert self.is_on_page(TorrentsPage)
|
||||
return self.page.iter_torrents()
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class PiratebayBrowser(BaseBrowser):
|
|||
|
||||
def iter_torrents(self, pattern):
|
||||
#self.location(self.buildurl('/torrents.php', searchstr=pattern))
|
||||
self.location('https://thepiratebay.org/search/%s/0/7/0' % pattern)
|
||||
self.location('https://thepiratebay.org/search/%s/0/7/0' % pattern.encode('utf-8'))
|
||||
|
||||
assert self.is_on_page(TorrentsPage)
|
||||
return self.page.iter_torrents()
|
||||
|
|
|
|||
|
|
@ -50,6 +50,6 @@ class YoujizzBrowser(BaseBrowser):
|
|||
if not pattern:
|
||||
self.home()
|
||||
else:
|
||||
self.location('/search/%s-1.html' % (urllib.quote_plus(pattern)))
|
||||
self.location('/search/%s-1.html' % (urllib.quote_plus(pattern.encode('utf-8'))))
|
||||
assert self.is_on_page(IndexPage)
|
||||
return self.page.iter_videos()
|
||||
|
|
|
|||
|
|
@ -47,6 +47,6 @@ class YoupornBrowser(BaseBrowser):
|
|||
if not pattern:
|
||||
self.home()
|
||||
else:
|
||||
self.location(self.buildurl('/search/%s' % sortby, query=pattern))
|
||||
self.location(self.buildurl('/search/%s' % sortby, query=pattern.encode('utf-8')))
|
||||
assert self.is_on_page(IndexPage)
|
||||
return self.page.iter_videos()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue