Crawler for Schul-Cloud Ressources
Project description
This crawler fetches ressources from urls and posts them to a server.
Purpose
The purpose of this crawler is:
We can provide test data to the API.
It can crawl ressources which are not active and cannot post.
Other crawl services can use this crawler to upload their conversions.
It has the full crawler logic but does not transform into other formats.
Maybe we can create recommendations or a library for crawlers from this case.
Requirements
The crawler should work as follows:
Provide urls
as command line arguments
as a link to a file with one url per line
Provide ressources
as one ressource in a file
as a list of ressources
The crawler must be invoked to crawl.
Example
This example gets a ressource from the url and post it to the api.
python3 -m ressource_url_crawler http://localhost:8080 \
https://raw.githubusercontent.com/schul-cloud/ressources-api-v1/master/schemas/ressource/examples/valid/example-website.json
Authentication
You can specify the authentication like this:
--basic=username:password for basic authentication
--apikey=apikey for api key authentication
Further Requirements
The crawler does not post ressources twice. This can be implemented by
caching the ressources locally, to see if they changed
compare ressource
compare timestamp
removing the ressources from the database if they are updated after posting new ressources.
This may require some form of state for the crawler. The state could be added to the ressources in a X-Ressources-Url-Crawler-Source field. This allows local caching and requires getting the objects from the database.
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
File details
Details for the file schul_cloud_url_crawler-1.0.16.tar.gz
.
File metadata
- Download URL: schul_cloud_url_crawler-1.0.16.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f064874d9b06a02009de967aea26cd59a7301a3c1e5a1db632965547abdd8a1 |
|
MD5 | fe59a6068c4b9cf2807b08f64651b2a4 |
|
BLAKE2b-256 | 0388d782086c0201b5b054cf3b9429854d8d042116de2062ca8b25b4911c4cf5 |
File details
Details for the file schul_cloud_url_crawler-1.0.16-py3-none-any.whl
.
File metadata
- Download URL: schul_cloud_url_crawler-1.0.16-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0c1bfcdc7274996bdf61134050f1f28630752ae943e858afbe4b4f0d21cbf7 |
|
MD5 | ff15d0ca897c1e24013ffa73c7b93921 |
|
BLAKE2b-256 | cb0c8fb8eb98d652c9bedd8ccb7e0a7252f75340a4261c3ca9c78308701c1e64 |