Small changes and improvements
This commit is contained in:
parent
15822b8876
commit
9aeed416c7
|
@ -19,10 +19,11 @@ def download_url(url):
|
||||||
resp = requests.get(url)
|
resp = requests.get(url)
|
||||||
open(path, "wb").write(resp.content);
|
open(path, "wb").write(resp.content);
|
||||||
|
|
||||||
post_count = 0
|
|
||||||
page = 0
|
page = 0
|
||||||
|
|
||||||
while (not done):
|
while (not done):
|
||||||
|
post_count = 0
|
||||||
|
|
||||||
response = requests.get("https://api.rule34.xxx/index.php?page=dapi&s=post&json=1&q=index&tags=" + tags + "&pid=" + str(page) + "");
|
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)
|
content = json.loads(response.content)
|
||||||
for entry in content:
|
for entry in content:
|
||||||
|
@ -31,6 +32,6 @@ while (not done):
|
||||||
|
|
||||||
if post_count == 100:
|
if post_count == 100:
|
||||||
page = page + 1
|
page = page + 1
|
||||||
post_count = 0
|
|
||||||
else:
|
else:
|
||||||
done = True
|
done = True
|
||||||
|
print("Done.")
|
||||||
|
|
Loading…
Reference in New Issue