Export movie ratings from filmweb.pl
Project description
filmweb-export
Eksport ocen filmów, seriali i gier 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?
- Otwórz Network Monitor w przeglądarce (
Ctrl+Shift+Ew Firefoxie), - Zaloguj się i wejdź na filmweb. Wpisz
infodo filtra w Network Monitor i zaznacz pierwszy wynik, - Wejdź w zakładkę Headers > Request Headers,
- Skopiuj wartość Cookie i podaj ją jako argument do skryptu.
Przykład
$ filmweb -f csv -f json pieca "didomi_token=(...)=="
INFO:root:Checking args...
INFO:root:Fetching list of rated titles [1/4]...
INFO:root:Fetching list of movie ratings...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 43.70it/s]
INFO:root:Fetching list of tv_show ratings...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 10.30it/s]
INFO:root:Skipping game, no ratings found
INFO:root:User pieca has 955 rated titles...
INFO:root:Fetching info about titles [2/4]...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 955/955 [01:02<00:00, 15.21it/s]
INFO:root:Fetching global rating for titles [3/4]...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 955/955 [01:15<00:00, 12.72it/s]
INFO:root:Writing data [4/4]...
INFO:root:pieca_20260604.json written!
INFO:root:pieca_20260604.csv written!
$ cat pieca_20260604.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",
"title_type": "movie",
"title_sub_type": "film_cinema",
"url": "https://www.filmweb.pl/film/Wej%C5%9Bcie+smoka%21-2016-757318",
"date": "2020-01-18"
}
$ duckdb -box -c "SELECT * FROM read_csv_auto('pieca_20260604.csv') ORDER BY RANDOM() LIMIT 3;"
┌───────────────┬──────────┬─────────────┬───────────────┬─────────────────────┬─────────────────┬─────────────────┬──────┬──────────┬────────────┬────────────────┬────────────────────────────────────────────────────────────────────┬────────────┐
│ timestamp │ favorite │ user_rating │ global_rating │ global_rating_count │ original_title │ pl_title │ year │ movie_id │ title_type │ title_sub_type │ url │ date │
├───────────────┼──────────┼─────────────┼───────────────┼─────────────────────┼─────────────────┼─────────────────┼──────┼──────────┼────────────┼────────────────┼────────────────────────────────────────────────────────────────────┼────────────┤
│ 1552236606975 │ NULL │ 7 │ 6.60002 │ 25576 │ Force Majeure │ Turysta │ 2014 │ 709434 │ movie │ film_cinema │ https://www.filmweb.pl/film/Turysta-2014-709434 │ 2019-03-10 │
│ 1638616857444 │ NULL │ 5 │ 7.27418 │ 60056 │ Pogoda na jutro │ Pogoda na jutro │ 2003 │ 39495 │ movie │ film_cinema │ https://www.filmweb.pl/film/Pogoda+na+jutro-2003-39495 │ 2021-12-04 │
│ 1638614791800 │ NULL │ 6 │ 7.69933 │ 51552 │ Żółty szalik │ Żółty szalik │ 2000 │ 32453 │ movie │ film_tv │ https://www.filmweb.pl/film/%C5%BB%C3%B3%C5%82ty+szalik-2000-32453 │ 2021-12-04 │
└───────────────┴──────────┴─────────────┴───────────────┴─────────────────────┴─────────────────┴─────────────────┴──────┴──────────┴────────────┴────────────────┴────────────────────────────────────────────────────────────────────┴────────────┘
Wszystkie opcje
$ filmweb -h
filmweb
Usage:
filmweb [--format=<fileformat>]... [--type=<titletype>]... [--debug] <username> <cookie>
Options:
-h --help Show this screen
-f --format=<fileformat> Output file format: json (default), csv, letterboxd
-t --type=<titletype> Title type: movie, tv_show, game (all by default)
-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) |
| title_type | typ tytułu (movie, tv_show, game) |
| title_sub_type | podtyp tytułu (np. serial_tv, mini_serial) |
| url | strona filmu |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file filmweb-0.11.tar.gz.
File metadata
- Download URL: filmweb-0.11.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e097b6c5cb81febad2e5e22ed13c2679e7a098fb68095d339d953f97e7e5b879
|
|
| MD5 |
d29cffaba6a84418434565cb288e823b
|
|
| BLAKE2b-256 |
04372e51bc58988b3bf4f47be1cb02821386292720c2b90bfb5a6a6d6e2fd734
|
File details
Details for the file filmweb-0.11-py3-none-any.whl.
File metadata
- Download URL: filmweb-0.11-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
804df4700a415b21cb66002df3d33a19a55954ea901785d179c3e77d31d8c0cc
|
|
| MD5 |
c86f5f373c7ad8ef8d85abbea882ab21
|
|
| BLAKE2b-256 |
c405067d2bbc3f1f612bd47d53a01c2c6356fb86c3b24d0baf89092cff41e3ed
|