Skip to main content

Export movie ratings from filmweb.pl

Project description

filmweb-export

Export ocen z serwisu Filmweb.

Instalacja

Wymagania:

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

Przykład

$ filmweb -f csv -f json pieca "didomi_token=(...)=="
INFO:root:Checking args...
INFO:root:Fetching list of movies [1/6]...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38/38 [00:07<00:00,  4.98it/s]
INFO:root:Parsing list of movies [2/6]...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38/38 [00:02<00:00, 15.47it/s]
INFO:root:User pieca has 938 movies...
INFO:root:Fetching user ratings [3/6]...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 938/938 [00:34<00:00, 27.34it/s]
INFO:root:Fetching info about movies [4/6]...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 938/938 [00:33<00:00, 27.63it/s]
INFO:root:Fetching global rating for movies [5/6]...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 938/938 [00:35<00:00, 26.57it/s]
INFO:root:Writing data [6/6]...
INFO:root:pieca_20230523.json written!
INFO:root:pieca_20230523.csv written!
$ cat pieca_20230523.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_20230523.csv | xsv sample 3 | xsv table
timestamp      favorite  user_rating  global_rating  global_rating_count  original_title          pl_title                 year  movie_id  url                                                                  date
1588407481213            9            7.91448        3777                 Werckmeister harmóniák  Harmonie Werckmeistera   2000  117108    https://www.filmweb.pl/film/Harmonie+Werckmeistera-2000-117108       2020-05-02
1425511804375            4            6.69102        87448                Czas surferów           Czas surferów            2005  137466    https://www.filmweb.pl/film/Czas+surfer%C3%B3w-2005-137466           2015-03-05
1496177689168            6            7.16478        619                  Kukačka v temném lese   Kukułka w ciemnym lesie  1984  35947     https://www.filmweb.pl/film/Kuku%C5%82ka+w+ciemnym+lesie-1984-35947  2017-05-30             2015-03-05

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

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

filmweb-0.8.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

filmweb-0.8-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file filmweb-0.8.tar.gz.

File metadata

  • Download URL: filmweb-0.8.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for filmweb-0.8.tar.gz
Algorithm Hash digest
SHA256 c00638c422049a7e5599a371bb7647f8a140968f464faf4c273f0ea410aebf0c
MD5 5a712cc78862081ffa354c055d6bdb34
BLAKE2b-256 1e00871c0035798c1e2a860534f0e3210d6703a37c09bea178f957a95a13d4cc

See more details on using hashes here.

File details

Details for the file filmweb-0.8-py3-none-any.whl.

File metadata

  • Download URL: filmweb-0.8-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for filmweb-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 41c472dc29e2ff7caa79ad50bb1292063da7661d7be9cd3677babc40a67cf152
MD5 707afd90c25a9a5e1219ade97eb20cf5
BLAKE2b-256 a82da6018c02ce9af2c50396456352686c538a8ce090b8a477c2797781604d93

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