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. Wpisz info do filtra w Network Monitor i zaznacz pierwszy wynik,
  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.10.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: filmweb-0.10.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for filmweb-0.10.tar.gz
Algorithm Hash digest
SHA256 bb422394fc8eb50ffe86661c405e22995809202657352751954677804d9447e3
MD5 12148f89a8c426024f5e841b38d8c497
BLAKE2b-256 a94195bddd2bcaf316e74bf6aa5b78ef85b65aa64f2e11e835a35ae2b84ae609

See more details on using hashes here.

File details

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

File metadata

  • Download URL: filmweb-0.10-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for filmweb-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6fb2f76051e5c71360184644bc7a54aa434823e1d92d27f6816120961518ab33
MD5 99760ade79101ea32e0f37e1f8ece30b
BLAKE2b-256 c8b92325208ddb836514ed47a12e591a63cf9bf49cc1217a905b482ec071ad20

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