filmweb


Namefilmweb JSON
Version 0.9 PyPI version JSON
download
home_page
SummaryExport movie ratings from filmweb.pl
upload_time2023-12-07 15:16:22
maintainer
docs_urlNone
authorPiotr Patrzyk
requires_python>=3.10
licenseMIT
keywords filmweb movie crawler data
VCS
bugtrack_url
requirements certifi charset-normalizer docopt idna requests tqdm urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # filmweb-export

Export ocen z serwisu [Filmweb](https://www.filmweb.pl).

## Instalacja

Wymagania:

- [Python](https://www.python.org/).

Instalacja:

```
pip install filmweb
```

Albo:

```
pip install https://github.com/ppatrzyk/filmweb-export/archive/master.zip
```

## Instrukcja

Istnieje możliwość eksportu własnych ocen lub ocen znajomych - proszę podać nazwę użytkownika jako `username`. Do dostępu jest potrzebne zalogowanie się na portal i podanie do skryptu wartości `cookie` dla strony filmweb. Podstawowe użycie:

```
filmweb <username> <cookie>
```

### Skąd wziąć cookie?

1. Otwórz *Network Monitor* w przeglądarce (`Ctrl+Shift+E` w Firefoxie),
2. Zaloguj się i wejdź na filmweb. Znajdź i wejdź w szczegóły obecnej strony,
3. Wejdź w zakładkę *Headers* > *Request Headers*,
4. Skopiuj wartość *Cookie* i podaj ją jako argument do skryptu.

![Browser Screenshot](browser_screen.jpg)

### Przykład

```
$ filmweb -f csv -f json pieca "didomi_token=(...)=="
INFO:root:Checking args...
INFO:root:Fetching list of movies [1/4]...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 13.94it/s]
INFO:root:User pieca has 939 movies...
INFO:root:Fetching info about movies [2/4]...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 939/939 [00:37<00:00, 25.19it/s]
INFO:root:Fetching global rating for movies [3/4]...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 939/939 [00:39<00:00, 23.70it/s]
INFO:root:Writing data [4/4]...
INFO:root:pieca_20231207.json written!
INFO:root:pieca_20231207.csv written!
$ cat pieca_20231207.json | jq .[0]
{
  "timestamp": 1579354599456,
  "favorite": null,
  "user_rating": 5,
  "global_rating": 6.03865,
  "global_rating_count": 414,
  "original_title": "Ejdeha Vared Mishavad!",
  "pl_title": "Wejście smoka!",
  "year": 2016,
  "movie_id": "757318",
  "url": "https://www.filmweb.pl/film/Wej%C5%9Bcie+smoka%21-2016-757318",
  "date": "2020-01-18"
}
$ cat pieca_20231207.csv | xsv sample 3 | xsv table
timestamp      favorite  user_rating  global_rating  global_rating_count  original_title           pl_title                    year  movie_id  url                                                                      date
1445174195445            4            7.12156        4212                 Bella                    Bella                       2006  294905    https://www.filmweb.pl/film/Bella-2006-294905                            2015-10-18
1425511762032            4            6.36319        42906                Veronika Decides to Die  Weronika postanawia umrzeć  2009  459178    https://www.filmweb.pl/film/Weronika+postanawia+umrze%C4%87-2009-459178  2015-03-05
1638617602312            3            8.62545        995071               The Green Mile           Zielona mila                1999  862       https://www.filmweb.pl/film/Zielona+mila-1999-862      
```

### Wszystkie opcje

```
$ filmweb -h
filmweb

Usage:
    filmweb [--format=<fileformat>]... [--debug] <username> <cookie>

Options:
    -h --help                     Show this screen
    -f --format=<fileformat>      Output file format: json (default), csv, letterboxd
    -d --debug                    Debug prints
```

## Dostępne dane:

Kolumna | Opis
--- | ---
year | _premiera_
global\_rating\_count | _ilość ocen filmu_
global\_rating | _ocena filmweb_
timestamp | _[czas oceny (unix)](https://pl.wikipedia.org/wiki/Czas_uniksowy)_
date | _data oceny_ (yyyy-mm-dd)
user\_rating | _ocena użytkownika_
favorite | _dodany do ulubionych_
original\_title | _tytuł oryginalny_
pl\_title | _tytuł polski_
movie\_id | _id filmu_ (filmweb)
url | _strona filmu_

## Znane problemy:

- Eksport tylko ocen filmów, inne (np. seriale) niedostępne,

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "filmweb",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "filmweb,movie,crawler,data",
    "author": "Piotr Patrzyk",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/d0/52/e8d31016334124c86596201617f75e4e76d6378069d39798153c0e951fa9/filmweb-0.9.tar.gz",
    "platform": null,
    "description": "# filmweb-export\n\nExport ocen z serwisu [Filmweb](https://www.filmweb.pl).\n\n## Instalacja\n\nWymagania:\n\n- [Python](https://www.python.org/).\n\nInstalacja:\n\n```\npip install filmweb\n```\n\nAlbo:\n\n```\npip install https://github.com/ppatrzyk/filmweb-export/archive/master.zip\n```\n\n## Instrukcja\n\nIstnieje mo\u017cliwo\u015b\u0107 eksportu w\u0142asnych ocen lub ocen znajomych - prosz\u0119 poda\u0107 nazw\u0119 u\u017cytkownika jako `username`. Do dost\u0119pu jest potrzebne zalogowanie si\u0119 na portal i podanie do skryptu warto\u015bci `cookie` dla strony filmweb. Podstawowe u\u017cycie:\n\n```\nfilmweb <username> <cookie>\n```\n\n### Sk\u0105d wzi\u0105\u0107 cookie?\n\n1. Otw\u00f3rz *Network Monitor* w przegl\u0105darce (`Ctrl+Shift+E` w Firefoxie),\n2. Zaloguj si\u0119 i wejd\u017a na filmweb. Znajd\u017a i wejd\u017a w szczeg\u00f3\u0142y obecnej strony,\n3. Wejd\u017a w zak\u0142adk\u0119 *Headers* > *Request Headers*,\n4. Skopiuj warto\u015b\u0107 *Cookie* i podaj j\u0105 jako argument do skryptu.\n\n![Browser Screenshot](browser_screen.jpg)\n\n### Przyk\u0142ad\n\n```\n$ filmweb -f csv -f json pieca \"didomi_token=(...)==\"\nINFO:root:Checking args...\nINFO:root:Fetching list of movies [1/4]...\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 10/10 [00:00<00:00, 13.94it/s]\nINFO:root:User pieca has 939 movies...\nINFO:root:Fetching info about movies [2/4]...\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 939/939 [00:37<00:00, 25.19it/s]\nINFO:root:Fetching global rating for movies [3/4]...\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 939/939 [00:39<00:00, 23.70it/s]\nINFO:root:Writing data [4/4]...\nINFO:root:pieca_20231207.json written!\nINFO:root:pieca_20231207.csv written!\n$ cat pieca_20231207.json | jq .[0]\n{\n  \"timestamp\": 1579354599456,\n  \"favorite\": null,\n  \"user_rating\": 5,\n  \"global_rating\": 6.03865,\n  \"global_rating_count\": 414,\n  \"original_title\": \"Ejdeha Vared Mishavad!\",\n  \"pl_title\": \"Wej\u015bcie smoka!\",\n  \"year\": 2016,\n  \"movie_id\": \"757318\",\n  \"url\": \"https://www.filmweb.pl/film/Wej%C5%9Bcie+smoka%21-2016-757318\",\n  \"date\": \"2020-01-18\"\n}\n$ cat pieca_20231207.csv | xsv sample 3 | xsv table\ntimestamp      favorite  user_rating  global_rating  global_rating_count  original_title           pl_title                    year  movie_id  url                                                                      date\n1445174195445            4            7.12156        4212                 Bella                    Bella                       2006  294905    https://www.filmweb.pl/film/Bella-2006-294905                            2015-10-18\n1425511762032            4            6.36319        42906                Veronika Decides to Die  Weronika postanawia umrze\u0107  2009  459178    https://www.filmweb.pl/film/Weronika+postanawia+umrze%C4%87-2009-459178  2015-03-05\n1638617602312            3            8.62545        995071               The Green Mile           Zielona mila                1999  862       https://www.filmweb.pl/film/Zielona+mila-1999-862      \n```\n\n### Wszystkie opcje\n\n```\n$ filmweb -h\nfilmweb\n\nUsage:\n    filmweb [--format=<fileformat>]... [--debug] <username> <cookie>\n\nOptions:\n    -h --help                     Show this screen\n    -f --format=<fileformat>      Output file format: json (default), csv, letterboxd\n    -d --debug                    Debug prints\n```\n\n## Dost\u0119pne dane:\n\nKolumna | Opis\n--- | ---\nyear | _premiera_\nglobal\\_rating\\_count | _ilo\u015b\u0107 ocen filmu_\nglobal\\_rating | _ocena filmweb_\ntimestamp | _[czas oceny (unix)](https://pl.wikipedia.org/wiki/Czas_uniksowy)_\ndate | _data oceny_ (yyyy-mm-dd)\nuser\\_rating | _ocena u\u017cytkownika_\nfavorite | _dodany do ulubionych_\noriginal\\_title | _tytu\u0142 oryginalny_\npl\\_title | _tytu\u0142 polski_\nmovie\\_id | _id filmu_ (filmweb)\nurl | _strona filmu_\n\n## Znane problemy:\n\n- Eksport tylko ocen film\u00f3w, inne (np. seriale) niedost\u0119pne,\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Export movie ratings from filmweb.pl",
    "version": "0.9",
    "project_urls": {
        "Source": "https://github.com/ppatrzyk/filmweb-export"
    },
    "split_keywords": [
        "filmweb",
        "movie",
        "crawler",
        "data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c01683e2d07bb6b736da829ee2f830abbf5988b773d1f145ab549396121a0b03",
                "md5": "02dcf6abf08b745c915b3d626f5181af",
                "sha256": "86416bffef2faceefcb471478e33b86bade8d0e123a108a7cd1766b0247a59eb"
            },
            "downloads": -1,
            "filename": "filmweb-0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "02dcf6abf08b745c915b3d626f5181af",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7866,
            "upload_time": "2023-12-07T15:16:20",
            "upload_time_iso_8601": "2023-12-07T15:16:20.877313Z",
            "url": "https://files.pythonhosted.org/packages/c0/16/83e2d07bb6b736da829ee2f830abbf5988b773d1f145ab549396121a0b03/filmweb-0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d052e8d31016334124c86596201617f75e4e76d6378069d39798153c0e951fa9",
                "md5": "940bb08d89598beb642bf8debb0bef79",
                "sha256": "3dd284d366cda1f50758febbe72a098b81ae8cb42e2b835dbe8c752210672165"
            },
            "downloads": -1,
            "filename": "filmweb-0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "940bb08d89598beb642bf8debb0bef79",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 7416,
            "upload_time": "2023-12-07T15:16:22",
            "upload_time_iso_8601": "2023-12-07T15:16:22.941762Z",
            "url": "https://files.pythonhosted.org/packages/d0/52/e8d31016334124c86596201617f75e4e76d6378069d39798153c0e951fa9/filmweb-0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-07 15:16:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ppatrzyk",
    "github_project": "filmweb-export",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2023.11.17"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.3.2"
                ]
            ]
        },
        {
            "name": "docopt",
            "specs": [
                [
                    "==",
                    "0.6.2"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.6"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.66.1"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        }
    ],
    "lcname": "filmweb"
}
        
Elapsed time: 0.16318s