Small changes and improvements

This commit is contained in:
leca 2023-02-17 21:51:16 +03:00
parent 15822b8876
commit 9aeed416c7
1 changed files with 3 additions and 2 deletions

View File

@ -19,10 +19,11 @@ def download_url(url):
resp = requests.get(url)
open(path, "wb").write(resp.content);
post_count = 0
page = 0
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) + "");
content = json.loads(response.content)
for entry in content:
@ -31,6 +32,6 @@ while (not done):
if post_count == 100:
page = page + 1
post_count = 0
else:
done = True
print("Done.")