+x on gumstarred, update get-fandom-wiki-urls

This commit is contained in:
Jeffrey Serio 2023-09-03 00:01:18 -05:00
parent d79f833449
commit 7f9bee10ee
2 changed files with 12 additions and 8 deletions

View File

@ -74,6 +74,14 @@ def get_urls(fandom: str) -> list():
return urls return urls
def help_message():
supported_wikis = ["cyberpunk", "dishonored", "dragonage", "forgottenrealms", "masseffect", "residentevil"]
print("Supply a fandom wiki name as arg1.\n")
print("Currently supported wikis:")
for wiki in supported_wikis:
print("- %s" % wiki)
if __name__ == "__main__": if __name__ == "__main__":
if len(sys.argv) > 1: if len(sys.argv) > 1:
@ -84,20 +92,16 @@ if __name__ == "__main__":
urls = get_urls("dishonored") urls = get_urls("dishonored")
case "dragonage": case "dragonage":
urls = get_urls("dragonage") urls = get_urls("dragonage")
case "forgottenrealms":
urls = get_urls("forgottenrealms")
case "masseffect": case "masseffect":
urls = get_urls("masseffect") urls = get_urls("masseffect")
case "residentevil": case "residentevil":
urls = get_urls("residentevil") urls = get_urls("residentevil")
case _: case _:
print("Enter a fandom wiki to scrape URLs from.") help_message()
for url in urls: for url in urls:
print(url) print(url)
else: else:
print("Please supply a fandom wiki name as arg1.") help_message()
print("Supported wikis:")
print("- cyberpunk")
print("- dishonored")
print("- dragonage")
print("- masseffect")
print("- residentevil")

0
gumstarred Normal file → Executable file
View File