mirror of
https://github.com/quatalog/quatalog.git
synced 2024-11-16 03:52:55 +00:00
Lint
This commit is contained in:
parent
c3be28e520
commit
ba3e5c77d1
|
@ -2,9 +2,13 @@ import json
|
|||
import sys
|
||||
import collections
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
print(f"USAGE: python {sys.argv[0]} <json from scraper> <by-course output file>", file=sys.stderr)
|
||||
print(
|
||||
f"USAGE: python {sys.argv[0]} <json from scraper> <by-course output file>",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 1
|
||||
with open(sys.argv[1], "r") as scraper_json:
|
||||
by_institution = json.load(scraper_json)
|
||||
|
@ -20,5 +24,6 @@ def main():
|
|||
with open(sys.argv[2], "w") as out_json:
|
||||
json.dump(by_rpi_course, out_json, sort_keys=True, indent=2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit(main())
|
||||
|
|
|
@ -306,7 +306,9 @@ def main():
|
|||
print(f"Using randomized user agent {user_agent}", file=sys.stderr)
|
||||
|
||||
with open(OUT_FILENAME, "w") as transferjson:
|
||||
json.dump(scrape_page(PAGE_NUM_TO_SCRAPE), transferjson, sort_keys=True, indent=2)
|
||||
json.dump(
|
||||
scrape_page(PAGE_NUM_TO_SCRAPE), transferjson, sort_keys=True, indent=2
|
||||
)
|
||||
|
||||
driver.quit()
|
||||
|
||||
|
|
Loading…
Reference in a new issue