CSFD.cz Scraper
This is a simple scraper for CSFD.cz, a Czech movie database.
Usage
Here is just sample usage of the scraper.
Even though the scraper is OOP, every resulted object is printable.
Every printed object is converted to JSON string.
Now with CLI!
# some help, you will need it
python3 cli.py --help
# to quickly get a movie
python3 cli.py movie -m 31881
# or just the title
python3 cli.py movie -m 31881 --title
# or just the title and duration?
python3 cli.py movie -m 31881 --title --duration
# need anything else for a movie?
python3 cli.py movie --help
Usage in code
from src.csfd_scraper import CsfdScraper
from src.csfd_objects import *
scraper = CsfdScraper()
Search movies by Advanced Search
result = scraper.search_movies({
MovieParams.TYPES: [MovieTypes.MOVIE],
MovieParams.ORIGINS: {
MovieOriginOptions.FILTER: MovieOriginFilters.AT_LEAST_ALL_SELECTED,
MovieOriginOptions.ORIGINS: [Origins.USA],
},
MovieParams.GENRES: {
MovieGenreOptions.FILTER: MovieGenreFilters.AT_LEAST_ALL_SELECTED,
MovieGenreOptions.GENRES: [
MovieGenres.ACTION,
MovieGenres.ADVENTURE,
MovieGenres.FANTASY,
MovieGenres.HORROR,
MovieGenres.COMEDY,
],
MovieGenreOptions.EXCLUDE: [MovieGenres.DRAMA, MovieGenres.EROTIC]
}
})
-
Should return The Monster Squad
Search creators by Advanced Search
result = scraper.search_creators({
CreatorParams.TYPES: [
CreatorTypes.COMPOSER,
CreatorTypes.DIRECTOR,
CreatorTypes.CINEMATOGRAPHER
],
CreatorParams.BIRTH_COUNTRY: Origins.USA,
CreatorParams.ADDITIONAL_FILTERS: [
CreatorFilters.WITH_BIOGRAPHY,
CreatorFilters.WITH_AWARDS,
CreatorFilters.WITH_TRIVIA
],
CreatorParams.GENDER: CreatorGenders.FEMALE
})
-
Should return Lana Del Rey
Metadata
Release files for x-csfd-scraper 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| x_csfd_scraper-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for x_csfd_scraper-1.0.2-py3-none-any.whl |
Release files / x_csfd_scraper-1.0.2-py3-none-any.whl
| Download URL | x_csfd_scraper-1.0.2-py3-none-any.whl |
|---|---|
| Size | 41.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b043458aa98df3250d26e8f00a70f4a104bc62aa1bb04c19c30d4baba86991ef
|
|
BLAKE2b-256 checksum How to use checksums |
3d950e98110deb3ad1b3a829a3684534ac6aaf44a4f47c7490f66643595a7ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for x-csfd-scraper 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.