From c73778910508d43a247feb868f870ad408c4d360 Mon Sep 17 00:00:00 2001 From: ryuslash Date: Mon, 18 Jan 2010 20:08:38 +0100 Subject: Started working on configuration file --- download.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'download.py') diff --git a/download.py b/download.py index 4783ced..28b316e 100644 --- a/download.py +++ b/download.py @@ -3,8 +3,9 @@ import urllib import os import htmlparser import progressbar +import config -savedir = "/home/slash/Pictures/4grab/" +savedir = Configuration().get_download_location() def get_thread_links(baseurl): myparser = htmlparser.MyParser() @@ -88,7 +89,7 @@ def get_images(t = []): if __name__ == "__main__": # Get a file-like object for the 4chan.org w/imgboard - base_url = "http://boards.4chan.org/w/" + base_url = "http://boards.4chan.org/" + Configuration().get_category() + "/" # Get the hyperlinks. t = get_thread_links(base_url) -- cgit v1.2.3-54-g00ecf