mirror of
https://codeberg.org/hyperreal/archive-fandom-wiki
synced 2024-11-25 09:33:41 +01:00
feat: support all wikis on fandom.com
This commit is contained in:
parent
aefa0db24b
commit
35b5438371
@ -5,6 +5,8 @@
|
|||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
sys.tracebacklimit = 0
|
||||||
import tarfile
|
import tarfile
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -37,10 +39,10 @@ class FandomWiki:
|
|||||||
response = requests.get(self.canonical_url)
|
response = requests.get(self.canonical_url)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except requests.HTTPError as http_err:
|
except requests.HTTPError as http_err:
|
||||||
console.print("Oops. Something went wrong. Likely one of the following:")
|
console.print("Oops. Something went wrong. Likely one of the following:\n")
|
||||||
console.print("(1) The wiki you requested does not exist.")
|
console.print("(1) The wiki you requested does not exist.")
|
||||||
console.print("(2) You typed the name of the wiki incorrectly.")
|
console.print("(2) You typed the name of the wiki incorrectly.")
|
||||||
console.print("(3) The server hosting that wiki is down for some reason.")
|
console.print("(3) The server hosting that wiki is down for some reason.\n")
|
||||||
console.print(f"HTTP error: {http_err}")
|
console.print(f"HTTP error: {http_err}")
|
||||||
|
|
||||||
def get_hop0_urls(self) -> list:
|
def get_hop0_urls(self) -> list:
|
||||||
|
Loading…
Reference in New Issue
Block a user