x-csfd-scraper


Namex-csfd-scraper JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/TheNoiselessNoise/csfd_scraper
SummarySimple scraper for CSFD.cz, a Czech movie database.
upload_time2024-08-15 04:31:57
maintainerNone
docs_urlNone
authorXYZT
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CSFD.cz Scraper

This is a simple scraper for [CSFD.cz](https://www.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!
```bash
# 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
```python
from src.csfd_scraper import CsfdScraper
from src.csfd_objects import *

scraper = CsfdScraper()
```

### Search movies by Advanced Search
```python
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](https://www.csfd.cz/film/31881-zahrobni-komando/prehled/)

### Search creators by Advanced Search
```python
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](https://www.csfd.cz/tvurce/84039-lana-del-rey/prehled/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TheNoiselessNoise/csfd_scraper",
    "name": "x-csfd-scraper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "XYZT",
    "author_email": "xyzt@xyzt.cz",
    "download_url": null,
    "platform": null,
    "description": "# CSFD.cz Scraper\n\nThis is a simple scraper for [CSFD.cz](https://www.csfd.cz/), a Czech movie database.\n\n## Usage\nHere is just sample usage of the scraper.\n\nEven though the scraper is OOP, every resulted object is printable.\\\nEvery printed object is converted to **JSON** string.\n\n### Now with CLI!\n```bash\n# some help, you will need it\npython3 cli.py --help\n\n# to quickly get a movie\npython3 cli.py movie -m 31881\n\n# or just the title\npython3 cli.py movie -m 31881 --title\n\n# or just the title and duration?\npython3 cli.py movie -m 31881 --title --duration\n\n# need anything else for a movie?\npython3 cli.py movie --help\n```\n\n### Usage in code\n```python\nfrom src.csfd_scraper import CsfdScraper\nfrom src.csfd_objects import *\n\nscraper = CsfdScraper()\n```\n\n### Search movies by Advanced Search\n```python\nresult = scraper.search_movies({\n    MovieParams.TYPES: [MovieTypes.MOVIE],\n    MovieParams.ORIGINS: {\n        MovieOriginOptions.FILTER: MovieOriginFilters.AT_LEAST_ALL_SELECTED,\n        MovieOriginOptions.ORIGINS: [Origins.USA],\n    },\n    MovieParams.GENRES: {\n        MovieGenreOptions.FILTER: MovieGenreFilters.AT_LEAST_ALL_SELECTED,\n        MovieGenreOptions.GENRES: [\n            MovieGenres.ACTION,\n            MovieGenres.ADVENTURE,\n            MovieGenres.FANTASY,\n            MovieGenres.HORROR,\n            MovieGenres.COMEDY,\n        ],\n        MovieGenreOptions.EXCLUDE: [MovieGenres.DRAMA, MovieGenres.EROTIC]\n    }\n})\n```\n- #### Should return [The Monster Squad](https://www.csfd.cz/film/31881-zahrobni-komando/prehled/)\n\n### Search creators by Advanced Search\n```python\nresult = scraper.search_creators({\n    CreatorParams.TYPES: [\n        CreatorTypes.COMPOSER,\n        CreatorTypes.DIRECTOR,\n        CreatorTypes.CINEMATOGRAPHER\n    ],\n    CreatorParams.BIRTH_COUNTRY: Origins.USA,\n    CreatorParams.ADDITIONAL_FILTERS: [\n        CreatorFilters.WITH_BIOGRAPHY,\n        CreatorFilters.WITH_AWARDS,\n        CreatorFilters.WITH_TRIVIA\n    ],\n    CreatorParams.GENDER: CreatorGenders.FEMALE\n})\n```\n- #### Should return [Lana Del Rey](https://www.csfd.cz/tvurce/84039-lana-del-rey/prehled/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple scraper for CSFD.cz, a Czech movie database.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/TheNoiselessNoise/csfd_scraper"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d950e98110deb3ad1b3a829a3684534ac6aaf44a4f47c7490f66643595a7ea0",
                "md5": "6f1f71d91f63cccb3d6e97dd816eb9be",
                "sha256": "b043458aa98df3250d26e8f00a70f4a104bc62aa1bb04c19c30d4baba86991ef"
            },
            "downloads": -1,
            "filename": "x_csfd_scraper-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f1f71d91f63cccb3d6e97dd816eb9be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 41172,
            "upload_time": "2024-08-15T04:31:57",
            "upload_time_iso_8601": "2024-08-15T04:31:57.987577Z",
            "url": "https://files.pythonhosted.org/packages/3d/95/0e98110deb3ad1b3a829a3684534ac6aaf44a4f47c7490f66643595a7ea0/x_csfd_scraper-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-15 04:31:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TheNoiselessNoise",
    "github_project": "csfd_scraper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "x-csfd-scraper"
}
        
Elapsed time: 0.40007s