Python library for scraping viggo assignments
Project description
Viggoscrape
Python library for scraping Viggo assignments.
This library is designed for danish users, and time will be adjusted to the CET timezone.
Quickstart
Information syntax
To use Viggoscrape, you need to provide it with login info and a subdomain.
Subdomain
For your subdomain, specify only the subdomain, like this:
subdomain-example
And not like this:
subdomain-example.viggo.dk
Login info
The login info uses 2 pieces of information:
- Username
- Password
Usage example
Let's try this out! We'll import the library, give it the required info and print the resulting dictionary.
from viggoscrape import get_assignments
subdomain = "subdomain-example"
login_info = {
"USERNAME": "example@example.com",
"PASSWORD": "Password1234"
}
assignment_data = get_assignments(subdomain, login_info)
print(assignment_data)
Our output would look something like this:
{
"subject": ["English", "Math"],
"time": ["31. aug 12:00", "2. sep 08:55"],
"description": ["Read pages 30 and 31", "Finish A, B and C"],
"author": ["28. aug 11:25 by John Doe", "31. aug 15:30 by Peter Anker"],
"files": ["None", "example.com/algebra.pdf"],
"file_names": ["None", "Intro to algebra"],
"url": ["https://example-subdomain.viggo.dk/Basic/HomewordAndAssignment/Details/1234/#modal", "https://example-subdomain.viggo.dk/Basic/HomewordAndAssignment/Details/1235/#modal"]
}
Now, you can do anything you want with this newfound data, like save it to a json file, create an embed for your discord bot, or any other purpose. Just use the same index on all lists and the data should match.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file viggoscrape-1.1.2.tar.gz.
File metadata
- Download URL: viggoscrape-1.1.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc81b9329f4df7411b917e50530c93380ea229f7edf7204f331d3cdc24a499b4
|
|
| MD5 |
5117b6ce1566146eb5654fc3aaf05bc6
|
|
| BLAKE2b-256 |
ec022b6d2da9d2c79ea1372404fb7ed1b539c2885ca3e891f022b9c1911e0a69
|
File details
Details for the file viggoscrape-1.1.2-py3-none-any.whl.
File metadata
- Download URL: viggoscrape-1.1.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0a19153bdde5427eb58b0b76dca85b305b901c142fa1d9a9ff01ae4dda82072
|
|
| MD5 |
303910a7255fa851b5f560124df5aeaa
|
|
| BLAKE2b-256 |
d69b4a56f17553c24df372bd73443075c73bdd676c5fb0cb2f1001194592114d
|