Skip to main content

Simple scraper for CSFD.cz, a Czech movie database.

Project description

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]
    }
})

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
})

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x_csfd_scraper-1.0.2-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file x_csfd_scraper-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: x_csfd_scraper-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for x_csfd_scraper-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b043458aa98df3250d26e8f00a70f4a104bc62aa1bb04c19c30d4baba86991ef
MD5 6f1f71d91f63cccb3d6e97dd816eb9be
BLAKE2b-256 3d950e98110deb3ad1b3a829a3684534ac6aaf44a4f47c7490f66643595a7ea0

See more details on using hashes here.

Supported by

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