|
@@ -239,9 +239,9 @@ __uripecker__flt_uris() {
|
239
|
239
|
echo 'import sys'
|
240
|
240
|
echo
|
241
|
241
|
echo 'for uri in re.findall(os.environ["URI_RE"], sys.stdin.read()):'
|
242
|
|
- echo ' print uri'
|
|
242
|
+ echo ' print(uri)'
|
243
|
243
|
)
|
244
|
|
- URI_RE=$uri_re python -c "$py_code"
|
|
244
|
+ URI_RE=$uri_re python3 -c "$py_code"
|
245
|
245
|
}
|
246
|
246
|
|
247
|
247
|
__uripecker__minimize() {
|
|
@@ -263,11 +263,12 @@ __uripecker__urlquote() {
|
263
|
263
|
local query=$1
|
264
|
264
|
debug -v query
|
265
|
265
|
#shellcheck disable=SC2028
|
266
|
|
- python -c "$(
|
267
|
|
- echo 'import urllib'
|
|
266
|
+ LC_ALL=en_US.UTF-8 python3 -c "$(
|
|
267
|
+ echo 'import urllib.parse'
|
268
|
268
|
echo 'import sys'
|
269
|
|
- echo 'print urllib.quote_plus(sys.argv[1])'
|
|
269
|
+ echo 'print(urllib.parse.quote_plus(sys.argv[1]))'
|
270
|
270
|
)" "$query"
|
|
271
|
+ #FIXME: There should be proper way w/o touching LC_ALL
|
271
|
272
|
}
|
272
|
273
|
|
273
|
274
|
#shellfu module-version=__MKIT_PROJ_VERSION__
|