mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 16:43:08 +01:00
+x on gumstarred, update get-fandom-wiki-urls
This commit is contained in:
parent
d79f833449
commit
7f9bee10ee
@ -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
0
gumstarred
Normal file → Executable file
Loading…
Reference in New Issue
Block a user