|
|
@@ -71,8 +71,14 @@ def download_file(file_url, file_path): |
|
|
|
elif r.status_code == 504: |
|
|
|
print("Server busy (504), couldn't get {}, try again later.".format(file_url)) |
|
|
|
return False |
|
|
|
elif r.status_code == 403: |
|
|
|
print("8ch.net returned 403 (forbidden). There can be many reasons for this, but a common one is trying to " |
|
|
|
"connect to 8ch.net (instead oxwugzccvk3dk6tj.onion) through Tor. If you are using Tor, " |
|
|
|
"please substitute r commands with tr (trl, trc, etc).") |
|
|
|
return False |
|
|
|
else: |
|
|
|
raise RuntimeError("Unexpected status code {} while trying to fetch {} - try opening in the browser, if that doesn't work submit an issue to the tracker.".format(r.status_code, file_url)) |
|
|
|
raise RuntimeError("Unexpected status code {} while trying to fetch {} - try opening in the browser, " |
|
|
|
"if that doesn't work submit an issue to the tracker.".format(r.status_code, file_url)) |
|
|
|
|
|
|
|
|
|
|
|
def generate_thread_json_url(board, thread_no): |