Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josh/imdb-data
IMDB personal lists and ratings data scaper
https://github.com/josh/imdb-data
csv gh-pages git-scraping imdb python
Last synced: about 1 month ago
JSON representation
IMDB personal lists and ratings data scaper
- Host: GitHub
- URL: https://github.com/josh/imdb-data
- Owner: josh
- License: mit
- Created: 2024-07-07T17:08:12.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-20T19:02:24.000Z (about 2 months ago)
- Last Synced: 2024-11-20T20:18:07.709Z (about 2 months ago)
- Topics: csv, gh-pages, git-scraping, imdb, python
- Language: Python
- Homepage:
- Size: 1.69 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imdb-data
IMDB scraper to fetch **your** watchlist, lists and ratings.
## Setup
Design to run via GitHub Actions. First, Fork this repository but only the `main` branch. Data is stored on `gh-pages` and probably don't want my personal data.
Then set up GitHub Action Repository secrets for the following:
- `IMDB_COOKIE`: The `Cookie` header value after you've logged in
Click "Watchlist" and see the URL bar for `https://www.imdb.com/user/ur***/watchlist`, then Edit for `https://www.imdb.com/list/ls**/edit`
- `IMDB_USER_ID`: The ID that starts with `ur`
- `IMDB_WATCHLIST_ID`: The ID that starts with `ls`## CLI Usage
Not officially published on Python Package Index (PyPI), but you can install it directly from GitHub:
```
$ pip install git+https://github.com/josh/imdb-data.git
``````
$ imdb-data
Usage: imdb-data [OPTIONS] COMMAND [ARGS]...Options:
-c, --cookie-file FILE imdb.com Cookie Jar file [required]
-v, --verbose Enable verbose logging
--help Show this message and exit.Commands:
check-ratings
check-watchlist
download-export
dump-cookies
import-cookies
watchlist-quicksync
```## Lib Usage
**requirements.txt**
```
imdb-data @ git+https://github.com/josh/imdb-data@main
``````python
import imdb_data
import requestsjar: requests.cookies.RequestsCookieJar = pickle.load(open("cookies.pickle", "rb"))
csvtext = get_export_text(jar, "watchlist")
print(csvtext)
```