{"id":15494882,"url":"https://github.com/fracpete/wai-scraper","last_synced_at":"2026-04-17T08:31:03.449Z","repository":{"id":54336103,"uuid":"283878520","full_name":"fracpete/wai-scraper","owner":"fracpete","description":"Webscraping library for the University of Waikato.","archived":false,"fork":false,"pushed_at":"2024-04-22T05:04:56.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-06T16:26:11.525Z","etag":null,"topics":["python","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fracpete.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-30T21:17:50.000Z","updated_at":"2024-04-22T05:04:59.000Z","dependencies_parsed_at":"2024-04-22T06:24:12.698Z","dependency_job_id":"b7d98183-88da-4fd4-8273-28bc73726dd3","html_url":"https://github.com/fracpete/wai-scraper","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.05882352941176472,"last_synced_commit":"276dcfab79189c2d87fbe9e04ffb407057c3ca61"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fracpete/wai-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fwai-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fwai-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fwai-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fwai-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fracpete","download_url":"https://codeload.github.com/fracpete/wai-scraper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fwai-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31921731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","selenium"],"created_at":"2024-10-02T08:15:30.484Z","updated_at":"2026-04-17T08:31:03.427Z","avatar_url":"https://github.com/fracpete.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wai-scraper\nPython webscraping library for the [University of Waikato](https://www.waikato.ac.nz/).\n\nUses [selenium](https://pypi.org/project/selenium/) and \n[selenium-requests](https://pypi.org/project/selenium-requests/) under the hood.\n\nWhile on campus, the [DUO](https://duo.com/) two-factor authentication does not\nprompt the user, which allows using the library in non-interactive mode (`init_driver(False)`).\nHowever, when off-campus, it is necessary to run it in interactive mode (`init_driver(True)`), \nin order to tick the *Remember me for 30 days* box and click on the *Send me a push* button to \naccept the authentication on your mobile device. \n\nThe use of selenium was inspired by:\nhttps://stackoverflow.com/a/23929939/4698227\n\n\n## Installation\n\nCreate a virtual environment:\n```bash\nvirtualenv -p /usr/bin/python3 venv\n```\n\nInstall *wai.scraper* in the virtual environment: \n```commandline\n./venv/bin/pip install git+https://github.com/fracpete/wai-scraper.git\n```\n\n\n## Example\n\nThe following example logs into the university website via [SSO](https://en.wikipedia.org/wiki/Single_sign-on) \nand outputs the HTML content of the staff landing page.\n\n```python\nimport getpass\nimport wai.scraper as ws\n\n# initialize logger with debugging output\nws.init_logger(True)\n\n# run Firefox in interactive mode (eg when off-campus, for interacting with 2FA) \ndriver = ws.init_driver(True)\n\n# perform logins\nuser = input(\"Enter user: \")\npw = getpass.getpass(\"Enter password: \")\nws.sso(driver, user, pw, delay=15)\n\nurl = 'https://www.waikato.ac.nz/landing/staff.shtml'\n\n# obtain staff landing page via selenium\nws.driver_get(driver, \"staff landing page\", url)\nprint(\"--\u003e selenium\")\nprint(driver.page_source)\n\n# close the session\nws.close_driver(driver)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffracpete%2Fwai-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffracpete%2Fwai-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffracpete%2Fwai-scraper/lists"}