diff options
author | ryuslash | 2010-02-11 22:05:37 +0100 |
---|---|---|
committer | ryuslash | 2010-02-11 22:05:37 +0100 |
commit | f09ea95c848a29492b682f954610a23daf753e15 (patch) | |
tree | b4a7a801cbac341f51eea45cf604bc0f18aaf76f /download.py | |
parent | 420bc469a486d99f62084841428c325ae769b76a (diff) | |
download | 4grab-f09ea95c848a29492b682f954610a23daf753e15.tar.gz 4grab-f09ea95c848a29492b682f954610a23daf753e15.zip |
Added --thread
With --thread a signle thread ID or thread URL can be entered.
If thread is a URL, it will download it.
If thread is an ID, a category must also be set.
Diffstat (limited to 'download.py')
-rw-r--r-- | download.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/download.py b/download.py index d892608..63040c9 100644 --- a/download.py +++ b/download.py @@ -58,6 +58,8 @@ def get_thread_links(baseurl): else: "\rOpening of", url, "did not succeed, trying next one..." i += 1 + + progress.complete() return myparser.get_hyperlinks() def get_image_links(baseurl, t = []): @@ -87,6 +89,7 @@ def get_image_links(baseurl, t = []): print "\rOpening of", img_url, "did not succeed, trying next one..." i += 1 + progress.complete() return mysubparser.get_hyperlinks() def get_images(t = []): @@ -108,6 +111,8 @@ def get_images(t = []): else: print "\rNot downloading", link, "already downloaded" i += 1 + + progress.complete() if __name__ == "__main__": # Get a file-like object for the 4chan.org w/imgboard |