Script now skip downloaded content
This commit is contained in:
parent
5d2aeb1d5f
commit
15822b8876
|
@ -12,6 +12,10 @@ def download_url(url):
|
|||
filename = url.split('/')[-1].replace(" ", "_")
|
||||
path = destination + "/" + filename
|
||||
print("Downloading: " + url + " -> " + path)
|
||||
if os.path.exists(path):
|
||||
print("Skipping downloaded content...")
|
||||
return # skip downloaded content
|
||||
|
||||
resp = requests.get(url)
|
||||
open(path, "wb").write(resp.content);
|
||||
|
||||
|
@ -19,7 +23,6 @@ post_count = 0
|
|||
page = 0
|
||||
|
||||
while (not done):
|
||||
|
||||
response = requests.get("https://api.rule34.xxx/index.php?page=dapi&s=post&json=1&q=index&tags=" + tags + "&pid=" + str(page) + "");
|
||||
content = json.loads(response.content)
|
||||
for entry in content:
|
||||
|
|
Loading…
Reference in New Issue