Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
log2cn authored Mar 9, 2025
1 parent 11c7a2d commit 52ddf90
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ def get_image_urls(target):
yield image_url, save_path

from sys import stdin, stderr
for line in stdin:
target = line.split("#")[0].strip()
if target:
try:
for array in get_image_urls(target):
print(*array)
except Exception as e:
print(f"{target}: {e.__class__.__name__}: {e}", file=stderr)
for target in stdin:
target = target.strip()
if not target or target.startswith('#'):
continue
try:
for array in get_image_urls(target):
print(*array)
except Exception as e:
print(f"{target}: {e.__class__.__name__}: {e}", file=stderr)

0 comments on commit 52ddf90

Please sign in to comment.