Skip to main content

Crawler for Schul-Cloud Ressources

Project description

Build Status Python Package Index

This crawler fetches ressources from urls and posts them to a server.

Purpose

The purpose of this crawler is:

  • We can provide tests 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

schul_cloud_url_crawler-1.0.12.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

schul_cloud_url_crawler-1.0.12-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file schul_cloud_url_crawler-1.0.12.tar.gz.

File metadata

File hashes

Hashes for schul_cloud_url_crawler-1.0.12.tar.gz
Algorithm Hash digest
SHA256 b8028d99f857a53e64f41c43e7b63359ba1977aaf9331b4ee8f6e1d71813ba42
MD5 345140a073f5d259824f8777295c4aab
BLAKE2b-256 ae69f59c5dc3eb6e3c56882ae1c4847a8e46b46dd4fc0207c740b45a5be1f221

See more details on using hashes here.

File details

Details for the file schul_cloud_url_crawler-1.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for schul_cloud_url_crawler-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 07dc5a65fcec12d6d2bba7702e2d6c5a511bfe1cd3bd806e1bf65481c1e422ac
MD5 b4206e4559092e8639e69fe07dbb87cb
BLAKE2b-256 4a908347a3721dafc21c6f643f6107933d7f6ad71e333fc5130f553227bbd176

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page