imdbio 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imdbio-0.0.1/.gitignore +213 -0
- imdbio-0.0.1/DISCLAIMER.txt +20 -0
- imdbio-0.0.1/LICENSE +21 -0
- imdbio-0.0.1/MANIFEST.in +2 -0
- imdbio-0.0.1/PKG-INFO +106 -0
- imdbio-0.0.1/README.md +66 -0
- imdbio-0.0.1/examples/example_akas.py +36 -0
- imdbio-0.0.1/examples/example_all_episodes.py +30 -0
- imdbio-0.0.1/examples/example_basic.py +51 -0
- imdbio-0.0.1/examples/example_custom_user_agent.py +31 -0
- imdbio-0.0.1/examples/example_filmography.py +16 -0
- imdbio-0.0.1/examples/example_genres_interests.py +22 -0
- imdbio-0.0.1/examples/example_person_detail.py +58 -0
- imdbio-0.0.1/examples/example_season_episodes.py +29 -0
- imdbio-0.0.1/examples/example_set_locale.py +25 -0
- imdbio-0.0.1/imdbio/__init__.py +57 -0
- imdbio-0.0.1/imdbio/exceptions.py +129 -0
- imdbio-0.0.1/imdbio/locale.py +68 -0
- imdbio-0.0.1/imdbio/models.py +704 -0
- imdbio-0.0.1/imdbio/parsers.py +867 -0
- imdbio-0.0.1/imdbio/services.py +804 -0
- imdbio-0.0.1/imdbio/transformers.py +74 -0
- imdbio-0.0.1/pyproject.toml +82 -0
- imdbio-0.0.1/uv.lock +1515 -0
imdbio-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
.idea
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
imdbinfo_aws
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py.cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
90
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
91
|
+
# .python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# UV
|
|
101
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
102
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
103
|
+
# commonly ignored for libraries.
|
|
104
|
+
#uv.lock
|
|
105
|
+
|
|
106
|
+
# poetry
|
|
107
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
108
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
109
|
+
# commonly ignored for libraries.
|
|
110
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
111
|
+
#poetry.lock
|
|
112
|
+
#poetry.toml
|
|
113
|
+
|
|
114
|
+
# pdm
|
|
115
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
116
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
117
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
118
|
+
#pdm.lock
|
|
119
|
+
#pdm.toml
|
|
120
|
+
.pdm-python
|
|
121
|
+
.pdm-build/
|
|
122
|
+
|
|
123
|
+
# pixi
|
|
124
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
125
|
+
#pixi.lock
|
|
126
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
127
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
128
|
+
.pixi
|
|
129
|
+
|
|
130
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
131
|
+
__pypackages__/
|
|
132
|
+
|
|
133
|
+
# Celery stuff
|
|
134
|
+
celerybeat-schedule
|
|
135
|
+
celerybeat.pid
|
|
136
|
+
|
|
137
|
+
# SageMath parsed files
|
|
138
|
+
*.sage.py
|
|
139
|
+
|
|
140
|
+
# Environments
|
|
141
|
+
.env
|
|
142
|
+
.envrc
|
|
143
|
+
.venv
|
|
144
|
+
env/
|
|
145
|
+
venv/
|
|
146
|
+
ENV/
|
|
147
|
+
env.bak/
|
|
148
|
+
venv.bak/
|
|
149
|
+
|
|
150
|
+
# Spyder project settings
|
|
151
|
+
.spyderproject
|
|
152
|
+
.spyproject
|
|
153
|
+
|
|
154
|
+
# Rope project settings
|
|
155
|
+
.ropeproject
|
|
156
|
+
|
|
157
|
+
# mkdocs documentation
|
|
158
|
+
/site
|
|
159
|
+
|
|
160
|
+
# mypy
|
|
161
|
+
.mypy_cache/
|
|
162
|
+
.dmypy.json
|
|
163
|
+
dmypy.json
|
|
164
|
+
|
|
165
|
+
# Pyre type checker
|
|
166
|
+
.pyre/
|
|
167
|
+
|
|
168
|
+
# pytype static type analyzer
|
|
169
|
+
.pytype/
|
|
170
|
+
|
|
171
|
+
# Cython debug symbols
|
|
172
|
+
cython_debug/
|
|
173
|
+
|
|
174
|
+
# PyCharm
|
|
175
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
176
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
177
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
178
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
179
|
+
#.idea/
|
|
180
|
+
|
|
181
|
+
# Abstra
|
|
182
|
+
# Abstra is an AI-powered process automation framework.
|
|
183
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
184
|
+
# Learn more at https://abstra.io/docs
|
|
185
|
+
.abstra/
|
|
186
|
+
|
|
187
|
+
# Visual Studio Code
|
|
188
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
189
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
190
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
191
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
192
|
+
# .vscode/
|
|
193
|
+
|
|
194
|
+
# Firecrawl research cache
|
|
195
|
+
.firecrawl/
|
|
196
|
+
|
|
197
|
+
# Ruff stuff:
|
|
198
|
+
.ruff_cache/
|
|
199
|
+
|
|
200
|
+
# PyPI configuration file
|
|
201
|
+
.pypirc
|
|
202
|
+
|
|
203
|
+
# Cursor
|
|
204
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
205
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
206
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
207
|
+
.cursorignore
|
|
208
|
+
.cursorindexingignore
|
|
209
|
+
|
|
210
|
+
# Marimo
|
|
211
|
+
marimo/_static/
|
|
212
|
+
marimo/_lsp/
|
|
213
|
+
__marimo__/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Disclaimer
|
|
2
|
+
|
|
3
|
+
The Author is not affiliated with Internet Movie Database Inc.
|
|
4
|
+
|
|
5
|
+
This library provides functionality to access and work with movie-related data that may originate from IMDb (www.imdb.com).
|
|
6
|
+
IMDb is a trademark of Internet Movie Database Inc., and all content and data
|
|
7
|
+
included on the IMDb's site is the property of IMDb or its content suppliers
|
|
8
|
+
and protected by the United States and international copyright laws.
|
|
9
|
+
|
|
10
|
+
Use of IMDb data through this library is subject to IMDb’s Terms and Conditions of Use (https://www.imdb.com/conditions/).
|
|
11
|
+
By using this library, you acknowledge and agree that:
|
|
12
|
+
|
|
13
|
+
1. You are solely responsible for ensuring that your use of IMDb data complies with IMDb’s Terms of Service and any applicable laws.
|
|
14
|
+
2. This library is provided "as is" without any warranty or guarantee of compliance with IMDb’s terms.
|
|
15
|
+
3. The author(s) of this library do not endorse or encourage any use of IMDb data that violates IMDb’s Terms of Service.
|
|
16
|
+
4. The author(s) of this library assume no liability for any misuse of the library, including but not limited to violations of IMDb’s Terms of Service.
|
|
17
|
+
|
|
18
|
+
If you require IMDb data for commercial or public-facing projects, you must obtain proper licensing directly from IMDb (https://developer.imdb.com/).
|
|
19
|
+
|
|
20
|
+
Please read any other notice on the https://www.imdb.com/ site.
|
imdbio-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Riajul
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
imdbio-0.0.1/MANIFEST.in
ADDED
imdbio-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: imdbio
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Python service for querying IMDb data
|
|
5
|
+
Project-URL: Homepage, https://rjriajul.github.io/imdbio/
|
|
6
|
+
Project-URL: Source, https://github.com/rjriajul/imdbio
|
|
7
|
+
Project-URL: Issues, https://github.com/rjriajul/imdbio/issues
|
|
8
|
+
Author: rjriajul
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: api,data,film,imdb,information,metadata,movie,python,scraper,tv
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Natural Language :: English
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Internet
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Requires-Dist: deprecated
|
|
29
|
+
Requires-Dist: imdbinfo-aws
|
|
30
|
+
Requires-Dist: jmespath
|
|
31
|
+
Requires-Dist: lxml
|
|
32
|
+
Requires-Dist: niquests
|
|
33
|
+
Requires-Dist: pydantic
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: poethepoet>=0.32; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
38
|
+
Requires-Dist: twine>=5; extra == 'dev'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
[](https://pepy.tech/projects/imdbio)
|
|
42
|
+
[](https://pypi.org/project/imdbio/)
|
|
43
|
+
[](https://pypi.org/project/imdbio/)
|
|
44
|
+
|
|
45
|
+
# imdbio
|
|
46
|
+
|
|
47
|
+
**Your personal gateway to IMDb data** — no API keys required.
|
|
48
|
+
|
|
49
|
+
## Features
|
|
50
|
+
|
|
51
|
+
- Search movies, series, and people by name or title
|
|
52
|
+
- Detailed movie info: cast, crew, ratings, box office, company credits
|
|
53
|
+
- TV series support with seasons and episodes
|
|
54
|
+
- Person details with biography, filmography and images
|
|
55
|
+
- Localized results in multiple languages (global or per-request)
|
|
56
|
+
- User reviews, trivia, parental guide, awards info
|
|
57
|
+
- Typed Pydantic models
|
|
58
|
+
- Built-in caching
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install imdbio
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
from imdbio import search_title, get_movie, get_name
|
|
70
|
+
|
|
71
|
+
# Search for a title
|
|
72
|
+
results = search_title("The Matrix")
|
|
73
|
+
for movie in results.titles:
|
|
74
|
+
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
|
|
75
|
+
|
|
76
|
+
# Get movie details
|
|
77
|
+
movie = get_movie("0133093")
|
|
78
|
+
print(movie.title, movie.year, movie.rating, movie.kind)
|
|
79
|
+
|
|
80
|
+
# Get person details
|
|
81
|
+
person = get_name("nm0000206")
|
|
82
|
+
print(person.name, person.birth_date)
|
|
83
|
+
|
|
84
|
+
# Series example
|
|
85
|
+
from imdbio import get_season_episodes
|
|
86
|
+
episodes = get_season_episodes("tt1520211", season=1) # Walking Dead
|
|
87
|
+
for ep in episodes[:3]:
|
|
88
|
+
print(ep.title, ep.rating)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
📝 More examples in the [examples](examples/) folder.
|
|
92
|
+
|
|
93
|
+
## Why choose imdbio?
|
|
94
|
+
|
|
95
|
+
- Clean structured data via Pydantic models
|
|
96
|
+
- No API keys or external dependencies
|
|
97
|
+
- Powered by niquests and lxml
|
|
98
|
+
- Ideal for scripts and data analysis
|
|
99
|
+
|
|
100
|
+
## Disclaimer
|
|
101
|
+
|
|
102
|
+
Not affiliated with IMDb Inc. See [DISCLAIMER](DISCLAIMER.txt).
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT — see [LICENSE](LICENSE).
|
imdbio-0.0.1/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[](https://pepy.tech/projects/imdbio)
|
|
2
|
+
[](https://pypi.org/project/imdbio/)
|
|
3
|
+
[](https://pypi.org/project/imdbio/)
|
|
4
|
+
|
|
5
|
+
# imdbio
|
|
6
|
+
|
|
7
|
+
**Your personal gateway to IMDb data** — no API keys required.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Search movies, series, and people by name or title
|
|
12
|
+
- Detailed movie info: cast, crew, ratings, box office, company credits
|
|
13
|
+
- TV series support with seasons and episodes
|
|
14
|
+
- Person details with biography, filmography and images
|
|
15
|
+
- Localized results in multiple languages (global or per-request)
|
|
16
|
+
- User reviews, trivia, parental guide, awards info
|
|
17
|
+
- Typed Pydantic models
|
|
18
|
+
- Built-in caching
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install imdbio
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from imdbio import search_title, get_movie, get_name
|
|
30
|
+
|
|
31
|
+
# Search for a title
|
|
32
|
+
results = search_title("The Matrix")
|
|
33
|
+
for movie in results.titles:
|
|
34
|
+
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
|
|
35
|
+
|
|
36
|
+
# Get movie details
|
|
37
|
+
movie = get_movie("0133093")
|
|
38
|
+
print(movie.title, movie.year, movie.rating, movie.kind)
|
|
39
|
+
|
|
40
|
+
# Get person details
|
|
41
|
+
person = get_name("nm0000206")
|
|
42
|
+
print(person.name, person.birth_date)
|
|
43
|
+
|
|
44
|
+
# Series example
|
|
45
|
+
from imdbio import get_season_episodes
|
|
46
|
+
episodes = get_season_episodes("tt1520211", season=1) # Walking Dead
|
|
47
|
+
for ep in episodes[:3]:
|
|
48
|
+
print(ep.title, ep.rating)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
📝 More examples in the [examples](examples/) folder.
|
|
52
|
+
|
|
53
|
+
## Why choose imdbio?
|
|
54
|
+
|
|
55
|
+
- Clean structured data via Pydantic models
|
|
56
|
+
- No API keys or external dependencies
|
|
57
|
+
- Powered by niquests and lxml
|
|
58
|
+
- Ideal for scripts and data analysis
|
|
59
|
+
|
|
60
|
+
## Disclaimer
|
|
61
|
+
|
|
62
|
+
Not affiliated with IMDb Inc. See [DISCLAIMER](DISCLAIMER.txt).
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from imdbio import get_akas, get_reviews, get_trivia, get_parental_guide
|
|
3
|
+
|
|
4
|
+
logging.basicConfig(level=logging.WARNING)
|
|
5
|
+
|
|
6
|
+
movies_list = [
|
|
7
|
+
"tt0133093", # The Matrix (movie)
|
|
8
|
+
"tt1520211", # The Walking Dead (tvSeries)
|
|
9
|
+
"tt30406366", # The Walking Dead: Daryl Dixon (tvMiniSeries)
|
|
10
|
+
"tt1589921", # The Walking Dead S01E01 (tvEpisode series)
|
|
11
|
+
"tt12326830", # 'The Sandman' (podcastSeries)
|
|
12
|
+
"tt15110916", # 'The Sandman' (2022) s01e01 (podcastEpisode)
|
|
13
|
+
"tt2080323", # Hotel Desire (short)
|
|
14
|
+
"tt36048590", # Marc Maron: Panicked (tvSpecial)
|
|
15
|
+
"tt6582384", # Red Nose Day Actually (tvShort)
|
|
16
|
+
"tt33238076", # Mafia: The Old Country (videoGame)
|
|
17
|
+
"tt11771594", # American Pie Presents: Girls' Rules (video)
|
|
18
|
+
"tt37195825", # Talking Heads: Psycho Killer (musicVideo)
|
|
19
|
+
"tt33501878", # title akas
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
for imdb_id in movies_list:
|
|
23
|
+
movie_akas = get_akas(imdb_id)
|
|
24
|
+
movie_reviews = get_reviews(imdb_id)
|
|
25
|
+
movie_trivia = get_trivia(imdb_id)
|
|
26
|
+
parental_guide = get_parental_guide(imdb_id)
|
|
27
|
+
print("##########################################################################")
|
|
28
|
+
print(movie_akas["akas"])
|
|
29
|
+
print(f"Reviews: {movie_reviews[:5]}")
|
|
30
|
+
print(f"Trivia: {movie_trivia[:5]}")
|
|
31
|
+
print(f"Parental Guide: {parental_guide}")
|
|
32
|
+
print("##########################################################################")
|
|
33
|
+
for category in parental_guide.categories:
|
|
34
|
+
print(category)
|
|
35
|
+
for category_text in category.content_descriptions:
|
|
36
|
+
print(f" - {category_text.text} (SPOILER: {category_text.is_spoiler})")
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from imdbio import get_movie, get_all_episodes
|
|
2
|
+
|
|
3
|
+
series_ids = [
|
|
4
|
+
"tt1520211", # The Walking Dead
|
|
5
|
+
"tt0944947", # Game of Thrones
|
|
6
|
+
"tt0903747", # Breaking Bad
|
|
7
|
+
"tt1838556", # a movie ... skip it
|
|
8
|
+
"tt4574334", # The Mandalorian
|
|
9
|
+
"tt0071007", # little house on the prairie
|
|
10
|
+
"tt35373097", # seires with no episodes
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
for series_id in series_ids:
|
|
14
|
+
series = get_movie(series_id)
|
|
15
|
+
if not series.is_series():
|
|
16
|
+
print(f"Series with ID {series_id} not found.")
|
|
17
|
+
continue
|
|
18
|
+
print(f"Movie Title: {series.title} ({series.year}) - {series.imdbId}")
|
|
19
|
+
print(f"Kind: {series.kind}")
|
|
20
|
+
print(f"Series Info: {series.info_series or 'N/A'}")
|
|
21
|
+
# creators
|
|
22
|
+
creators = series.info_series.get_creators()
|
|
23
|
+
print(f"Creators: {', '.join([str(creator) for creator in creators]) or 'N/A'}")
|
|
24
|
+
print("----------------------------------------------")
|
|
25
|
+
|
|
26
|
+
all_episodes = get_all_episodes(series_id)
|
|
27
|
+
print(f"\nTotal Episodes in Series: {len(all_episodes)}")
|
|
28
|
+
for episode in all_episodes:
|
|
29
|
+
print(f"{episode}")
|
|
30
|
+
print("\n" + "=" * 50 + "\n")
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from time import time
|
|
2
|
+
from imdbio import search_title, get_movie, get_name
|
|
3
|
+
|
|
4
|
+
import logging
|
|
5
|
+
|
|
6
|
+
logging.basicConfig(level=logging.WARNING)
|
|
7
|
+
# list_q = "little house|matrix|walking dead|horizon".split("|")
|
|
8
|
+
list_q = "France to find his estate confiscated by governor Narbonne, for back taxes, and resold to Katrina, a Dutch Countess. Katrina offers to return Pierre's property if he will help her get possession".split(
|
|
9
|
+
" "
|
|
10
|
+
)
|
|
11
|
+
# Example 1: Search for a movie by title
|
|
12
|
+
|
|
13
|
+
for word in list_q:
|
|
14
|
+
print(f"Searching for movies with title containing: {word}")
|
|
15
|
+
results = search_title(word)
|
|
16
|
+
if results:
|
|
17
|
+
for movie in results.titles:
|
|
18
|
+
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
|
|
19
|
+
movie = get_movie(movie.imdb_id)
|
|
20
|
+
print(f" URL: {movie.url}")
|
|
21
|
+
print(f" Rating: {movie.rating}")
|
|
22
|
+
print(f" MPAA: {movie.mpaa}")
|
|
23
|
+
print(
|
|
24
|
+
f" Countries: {', '.join(movie.countries) if movie.countries else 'N/A'}"
|
|
25
|
+
)
|
|
26
|
+
print(
|
|
27
|
+
f" Languages codes: {', '.join(movie.languages) if movie.languages else 'N/A'}"
|
|
28
|
+
)
|
|
29
|
+
print(
|
|
30
|
+
f" Languages: {', '.join(movie.languages_text) if movie.languages_text else 'N/A'}"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
print(f" Kind: {movie.kind}")
|
|
34
|
+
if movie.is_series():
|
|
35
|
+
print(f" Series Info: {movie.info_series or 'N/A'}")
|
|
36
|
+
if movie.is_episode():
|
|
37
|
+
print(f" Episode Info: {movie.info_episode or 'N/A'}")
|
|
38
|
+
for director in movie.directors:
|
|
39
|
+
print(f" Director: {director.name}")
|
|
40
|
+
for c in movie.categories["cast"][
|
|
41
|
+
:1
|
|
42
|
+
]: # Limit to first 3 cast members for brevity
|
|
43
|
+
# print(c)
|
|
44
|
+
t0 = time()
|
|
45
|
+
person = get_name(c.imdb_id)
|
|
46
|
+
t1 = time()
|
|
47
|
+
print(
|
|
48
|
+
f" Cast: \n\t{person.name} ({', '.join(c.characters)}) - {' ° '.join(person.primary_profession[:2])} - {person.url} "
|
|
49
|
+
)
|
|
50
|
+
# DONE
|
|
51
|
+
print("----------------------------------------------")
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Example: Using a custom User-Agent
|
|
3
|
+
|
|
4
|
+
This example demonstrates how to override the default User-Agent
|
|
5
|
+
used for HTTP requests to IMDb.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from imdbio import get_movie
|
|
9
|
+
from imdbio.services import USER_AGENTS_LIST
|
|
10
|
+
|
|
11
|
+
# Check the default User-Agent
|
|
12
|
+
print(f"Default User-Agent List: {USER_AGENTS_LIST}")
|
|
13
|
+
|
|
14
|
+
# Override with a custom User-Agent
|
|
15
|
+
USER_AGENTS_LIST = [
|
|
16
|
+
"MyCustomApp/1.0 (Contact: myemail@example.com)",
|
|
17
|
+
"AnotherUserAgent/2.0",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
print(f"Custom User-Agent List: {USER_AGENTS_LIST}")
|
|
21
|
+
|
|
22
|
+
# Now all requests will use the custom User-Agent
|
|
23
|
+
try:
|
|
24
|
+
movie = get_movie("tt0133093") # The Matrix
|
|
25
|
+
print(f"\nFetched movie: {movie.title} ({movie.year})")
|
|
26
|
+
print(f"Rating: {movie.rating}")
|
|
27
|
+
except Exception as e:
|
|
28
|
+
print(f"Error: {e}")
|
|
29
|
+
|
|
30
|
+
# Note: If you get an error, the error message will now include
|
|
31
|
+
# more details like HTTP status code and response text
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from imdbio import get_filmography
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
logging.basicConfig(level=logging.WARNING)
|
|
6
|
+
|
|
7
|
+
n = "nm0000206"
|
|
8
|
+
|
|
9
|
+
filmography_results = get_filmography(n)
|
|
10
|
+
if filmography_results:
|
|
11
|
+
for role, films in filmography_results.items():
|
|
12
|
+
print(f"\nRole: {role}")
|
|
13
|
+
for film in films:
|
|
14
|
+
print(f" - {film.title} ({film.year}) [{film.imdbId}]")
|
|
15
|
+
# cover
|
|
16
|
+
print(f" Cover URL: {film.cover_url}")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from imdbio import get_movie, get_all_interests
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
logging.basicConfig(level=logging.WARNING)
|
|
6
|
+
|
|
7
|
+
# List of movie IMDb IDs with comments for maintainability
|
|
8
|
+
MOVIE_IDS = [
|
|
9
|
+
"tt1490017", # Frozen (2013)
|
|
10
|
+
"tt0133093", # The Matrix (1999)
|
|
11
|
+
"tt2347569", # Pacific Rim (2013)
|
|
12
|
+
"tt31184028", # Dune: Part Two (2024)
|
|
13
|
+
"tt1745960", # Top Gun: Maverick (2022)
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
for imdb_id in MOVIE_IDS:
|
|
17
|
+
movie_details = get_movie(imdb_id)
|
|
18
|
+
print(f"#{movie_details.title} ({movie_details.year})")
|
|
19
|
+
interests = get_all_interests(imdb_id)
|
|
20
|
+
print("Genres:", movie_details.genres)
|
|
21
|
+
print(f"Interests : {interests}")
|
|
22
|
+
print("-----------------------")
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from imdbio import search_title, get_name, get_movie
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
from imdbio.services import get_filmography
|
|
6
|
+
|
|
7
|
+
logging.basicConfig(level=logging.WARNING)
|
|
8
|
+
|
|
9
|
+
# Example 1: Search for a person by name
|
|
10
|
+
person_results = search_title("Mary")
|
|
11
|
+
for p in person_results.names:
|
|
12
|
+
print(f"{p.name} - {p.job} ({p.id})")
|
|
13
|
+
person = get_name(p.id)
|
|
14
|
+
if person:
|
|
15
|
+
print(f"Known For: {', '.join(person.knownfor)}")
|
|
16
|
+
print(f"Image URL: {person.image_url}")
|
|
17
|
+
print(f"IMDb URL: {person.url}")
|
|
18
|
+
print(f"Name: {person.name}")
|
|
19
|
+
print(f"Known For: {', '.join(person.knownfor)}")
|
|
20
|
+
print(f"Birth Date: {person.birth_date}")
|
|
21
|
+
print(f"Birth Place: {person.birth_place}")
|
|
22
|
+
print(f"Death Date: {person.death_date}")
|
|
23
|
+
print(f"Death Place: {person.death_place}")
|
|
24
|
+
print(f"Death Reason: {person.death_reason}")
|
|
25
|
+
print(f"Bio: {person.bio[:100]}...") # Print first 100 characters of bio
|
|
26
|
+
print(f"Height: {person.height}")
|
|
27
|
+
print(f"Primary Profession: {', '.join(person.primary_profession)}")
|
|
28
|
+
print(f"Image URL: {person.image_url}")
|
|
29
|
+
print(f"IMDb URL: {person.url}")
|
|
30
|
+
|
|
31
|
+
movie = get_movie("0133093")
|
|
32
|
+
for p in movie.categories["cast"]:
|
|
33
|
+
print(f"{p.name} - {p.job} ({p.id})")
|
|
34
|
+
person = get_name(p.id)
|
|
35
|
+
if person:
|
|
36
|
+
print(f"Known For: {', '.join(person.knownfor)}")
|
|
37
|
+
print(f"Image URL: {person.image_url}")
|
|
38
|
+
print(f"IMDb URL: {person.url}")
|
|
39
|
+
print(f"Name: {person.name}")
|
|
40
|
+
print(f"Known For: {', '.join(person.knownfor)}")
|
|
41
|
+
print(f"Birth Date: {person.birth_date}")
|
|
42
|
+
print(f"Birth Place: {person.birth_place}")
|
|
43
|
+
print(f"Death Date: {person.death_date}")
|
|
44
|
+
print(f"Death Place: {person.death_place}")
|
|
45
|
+
print(f"Death Reason: {person.death_reason}")
|
|
46
|
+
print(f"Bio: {person.bio[:100]}...") # Print first 100 characters of bio
|
|
47
|
+
print(f"Height: {person.height}")
|
|
48
|
+
print(f"Primary Profession: {', '.join(person.primary_profession)}")
|
|
49
|
+
print(f"Image URL: {person.image_url}")
|
|
50
|
+
print(f"IMDb URL: {person.url}")
|
|
51
|
+
|
|
52
|
+
# filmography
|
|
53
|
+
filmography_results = get_filmography(person.id)
|
|
54
|
+
if filmography_results:
|
|
55
|
+
for role, films in filmography_results.items():
|
|
56
|
+
print(f"\nRole: {role}")
|
|
57
|
+
for film in films:
|
|
58
|
+
print(f" - {film.title} ({film.year}) [{film.imdbId}]")
|