Merge pull request #63 from Fongshway/master

Update functionality to open search results
This commit is contained in:
Arun Prakash Jana 2016-09-01 23:23:06 +05:30 committed by GitHub
commit c3080b7f36

11
buku
View File

@ -1287,15 +1287,22 @@ def prompt(results, noninteractive=False, delete=False):
except Exception as e:
_, _, linenumber, func, _, _ = inspect.stack()[0]
logger.error('%s(), ln %d: %s', func, linenumber, e)
elif "-" in nav and is_int(nav.split("-")[0]) and is_int(nav.split("-")[1]):
elif "-" in nav and is_int(nav.split("-")[0]) and is_int(nav.split("-")[1]):
lower = int(nav.split("-")[0])
upper = int(nav.split("-")[1])
for index in range(lower-1,upper-1):
for index in range(lower-1,upper):
try:
browser_open(unquote(results[index][1]))
except Exception as e:
_, _, linenumber, func, _, _ = inspect.stack()[0]
logger.error('%s(), ln %d: %s', func, linenumber, e)
elif " " in nav and is_int(nav.split(" ")[0]) and is_int(nav.split(" ")[1]):
for index in nav.strip().split(' '):
try:
browser_open(unquote(results[int(index)-1][1]))
except Exception as e:
_, _, linenumber, func, _, _ = inspect.stack()[0]
logger.error('%s(), ln %d: %s', func, linenumber, e)
else:
break