Sample Header Ad - 728x90

How do I open multiple links using feh?

2 votes
1 answer
195 views
I'm writing a program that gets a bunch of images from Librex' API, then opens them in feh. Here's the source: args = sys.argv[1:] for i in args: if "-" in i: args.remove(i) sch = quote("+".join(args).replace(" ", "+")).replace("%2B", "+") sts = ["librex.extravi.dev", "librex.beparanoid.de", "search.davidovski.xyz", "search.madreyk.xyz", "librex.catalyst.sx"] st = random.choice(sts) def images(search, site): URL = f"https://{site}/api.php?q={search}&p=0&type=1 " data = requests.get(url=URL).json() imgList = str() for i in data[:2]: imgList += f" {i['thumbnail']}" subprocess.Popen(["feh", imgList]) images(sch, st) But when I run the final "feh" command with multiple options, I get an error message along the lines of feh WARNING: Image https://s2.qwant.com/thumbr/example2 does not exist - skipping I've tried running feh alone with each link, so it isn't something wrong with the links. But then if I re run feh with all the links, I get the same error. Is there a way to run feh with multiple URLs?
Asked by ecjwthx (21 rep)
Oct 14, 2022, 09:31 PM
Last activity: Oct 18, 2023, 08:38 PM