Updated errors to print out url
This commit is contained in:
parent
22c5a6e231
commit
af2e4df3dc
@ -123,13 +123,13 @@ class downloader:
|
|||||||
search_request = requests.get(search_url, headers=self.header)
|
search_request = requests.get(search_url, headers=self.header)
|
||||||
|
|
||||||
if search_request.status_code != 200:
|
if search_request.status_code != 200:
|
||||||
print("Search request returned:", search_request.status_code)
|
print("Search {} request returned: {}".format(search_url, search_request.status_code))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
selected = select_from_response(search_request.json(), profile, self.max_size)
|
selected = select_from_response(search_request.json(), profile, self.max_size)
|
||||||
|
|
||||||
if selected is None:
|
if selected is None:
|
||||||
print("Could not select image based on criteria")
|
print("Could not select image based on criteria", search_url)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
tag_response = collect_tags(selected)
|
tag_response = collect_tags(selected)
|
||||||
|
@ -146,7 +146,7 @@ class downloader:
|
|||||||
search_ok = search_request.status_code == 200
|
search_ok = search_request.status_code == 200
|
||||||
|
|
||||||
if not search_ok:
|
if not search_ok:
|
||||||
print("Search request returned:", search_request.status_code)
|
print("Search {} request returned: {}".format(search_url, search_request.status_code))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
posts = search_request.json()["post"]
|
posts = search_request.json()["post"]
|
||||||
@ -155,7 +155,7 @@ class downloader:
|
|||||||
selected = select_from_response(posts, profile, self.max_size)
|
selected = select_from_response(posts, profile, self.max_size)
|
||||||
|
|
||||||
if selected is None:
|
if selected is None:
|
||||||
print("Could not select image based on criteria")
|
print("Could not select image based on criteria", search_url)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
tag_response = collect_tags(selected)
|
tag_response = collect_tags(selected)
|
||||||
|
@ -136,7 +136,7 @@ class downloader:
|
|||||||
search_request = self.search(search_url)
|
search_request = self.search(search_url)
|
||||||
|
|
||||||
if search_request.status_code != 200:
|
if search_request.status_code != 200:
|
||||||
print("Search request returned:", search_request.status_code)
|
print("Search {} request returned: {}".format(search_url, search_request.status_code))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
posts = search_request.json()
|
posts = search_request.json()
|
||||||
@ -145,7 +145,7 @@ class downloader:
|
|||||||
selected = select_from_response(posts, profile)
|
selected = select_from_response(posts, profile)
|
||||||
|
|
||||||
if selected is None:
|
if selected is None:
|
||||||
print("Could not select image based on criteria")
|
print("Could not select image based on criteria", search_url)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
search_request = self.search(search_url_html)
|
search_request = self.search(search_url_html)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user