strip '/' in search pattern to avoid a 404 HTTP error
This commit is contained in:
parent
8fcf695783
commit
a9603b4b2d
2 changed files with 4 additions and 3 deletions
|
|
@ -46,10 +46,11 @@ class DailymotionBrowser(BaseBrowser):
|
|||
if not pattern:
|
||||
self.home()
|
||||
else:
|
||||
pattern = pattern.replace('/', '').encode('utf-8')
|
||||
if sortby is None:
|
||||
url = '/search/%s/1' % quote_plus(pattern.encode('utf-8'))
|
||||
url = '/search/%s/1' % quote_plus(pattern)
|
||||
else:
|
||||
url = '/%s/search/%s/1' % (sortby, quote_plus(pattern.encode('utf-8')))
|
||||
url = '/%s/search/%s/1' % (sortby, quote_plus(pattern))
|
||||
self.location(url)
|
||||
|
||||
assert self.is_on_page(IndexPage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue