Merge pull request #79 from pubs/bug/websearch_fix
Fixes websearch in Python 3 (fix #69)
This commit is contained in:
commit
0dd51aff58
@ -1,6 +1,6 @@
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
import urllib
|
|
||||||
|
|
||||||
|
from .. import p3
|
||||||
from ..uis import get_ui
|
from ..uis import get_ui
|
||||||
|
|
||||||
|
|
||||||
@ -18,5 +18,5 @@ def command(conf, args):
|
|||||||
search_string = args.search_string
|
search_string = args.search_string
|
||||||
|
|
||||||
url = ("https://scholar.google.fr/scholar?q=%s&lr="
|
url = ("https://scholar.google.fr/scholar?q=%s&lr="
|
||||||
% (urllib.quote_plus(' '.join(search_string))))
|
% (p3.quote_plus(' '.join(search_string))))
|
||||||
webbrowser.open(url)
|
webbrowser.open(url)
|
||||||
|
@ -17,6 +17,7 @@ if sys.version_info[0] == 2:
|
|||||||
ustr = unicode
|
ustr = unicode
|
||||||
uchr = unichr
|
uchr = unichr
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
from urllib import quote_plus
|
||||||
from urllib2 import urlopen
|
from urllib2 import urlopen
|
||||||
from httplib import HTTPConnection
|
from httplib import HTTPConnection
|
||||||
file = None
|
file = None
|
||||||
@ -30,7 +31,7 @@ if sys.version_info[0] == 2:
|
|||||||
else:
|
else:
|
||||||
ustr = str
|
ustr = str
|
||||||
uchr = chr
|
uchr = chr
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse, quote_plus
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
from http.client import HTTPConnection
|
from http.client import HTTPConnection
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user