scrazzz / redgifs

Simple Python API wrapper for the RedGIFs API
https://redgifs.rtfd.io
MIT License
91 stars 12 forks source link

--list option exits after 1st file is downloaded #26

Closed workingset closed 9 months ago

workingset commented 9 months ago

Summary

If you specify a file with a list of redgif URLs, the first URL is downloaded, then the program exits.

Reproduction Steps

redgifs --list <file_with_urls>

Expected Result

Content of each URL in the NL-delimited file to be downloaded in a separate file in the current working directory.

Actual Result

Only 1st file in the list is downloaded, then the program exits with no error.

System Information

 >python -m redgifs --version
- Python v3.11.6-final
- redgifs v1.8.0-final
- aiohttp v3.9.1
- system info: Windows 10 10.0.22621

Checklist

Additional Information

Culprit appears to be the premature exit(0) after the "Download Complete" message is printed in the main "do_dl" function.

If you remove / comment that line, the "--list" functionality works as expected.

workingset commented 9 months ago

This line: https://github.com/scrazzz/redgifs/blob/e951fcaca3d57891b3ede72063eab988e54c6acf/redgifs/__main__.py#L98

scrazzz commented 9 months ago

Hey, thanks for pointing out the issue. I'll fix it and release the new version soon:tm: (when I get the time).

Feel free to open a PR to fix this issue.

scrazzz commented 9 months ago

A fix for this has been released! Please update redgifs to v1.8.1.