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/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)
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.9.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

filmweb-0.9-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: filmweb-0.9.tar.gz
  • Upload date:
  • Size: 7.4 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.12

File hashes

Hashes for filmweb-0.9.tar.gz
Algorithm Hash digest
SHA256 3dd284d366cda1f50758febbe72a098b81ae8cb42e2b835dbe8c752210672165
MD5 940bb08d89598beb642bf8debb0bef79
BLAKE2b-256 d052e8d31016334124c86596201617f75e4e76d6378069d39798153c0e951fa9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: filmweb-0.9-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.12

File hashes

Hashes for filmweb-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 86416bffef2faceefcb471478e33b86bade8d0e123a108a7cd1766b0247a59eb
MD5 02dcf6abf08b745c915b3d626f5181af
BLAKE2b-256 c01683e2d07bb6b736da829ee2f830abbf5988b773d1f145ab549396121a0b03

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