Skip to content

Commit

Permalink
change package name (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon authored Aug 13, 2023
1 parent c7c0972 commit 7cbfafa
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 27 deletions.
56 changes: 33 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# moviedb

`moviedb` is a python wrapper to represent the [IMDB](https://www.imdb.com) API. It helps you to get files i.e. Movies/TV-Series information from IMDB by scraping.
`imdbmovies` is a python wrapper to represent the [IMDB](https://www.imdb.com) API. It helps you to get files i.e. Movies/TV-Series information from IMDB by scraping.

Differences compared to [pymoviedb](https://github.com/itsmehemant7/PyMovieDb):
- Includes language support. ([@9Mad-Max5](https://github.com/9Mad-Max5))
Expand All @@ -13,21 +13,22 @@ _*Feature and fix PR's are welcome*_

## Installation

`moviedb` is available on [pypi](https://pypi.org/project/moviedb/):

```pip install moviedb```
`imdbmovies` is available on [pypi](https://pypi.org/project/imdbmovies/):

```pip install imdbmovies```

## Documentation
**1) Getting a Movie/Tv-Series info :-**

**1. Getting a Movie/Tv-Series info:**

Use ``` get_by_name(<name>, tv=False) ``` method to get information of a movie/TV-Series.

The ``` tv ``` is an optional argument, if ``` tv=True``` it will get data from ```TV Series``` files only.

On the other hand, if ```tv=False``` (default), it will find your file in ```Movies + TV Series``` results
On the other hand, if ```tv=False``` (default), it will find your file in ```Movies + TV Series``` results:

```python
>>> from moviedb import IMDB
>>> from imdbmovies import IMDB
>>> imdb = IMDB()
>>> res = imdb.get_by_name('House Of The Dragon', tv=True)
>>> print(res)
Expand Down Expand Up @@ -89,11 +90,13 @@ On the other hand, if ```tv=False``` (default), it will find your file in ```Mov
>>>

```
**2) Getting a file Info by it's IMDB ID :-**

Use ```get_by_id(<ID>)``` method to get a file information by it's IMDB ID.
**2. Getting a file Info by it's IMDB ID:**

Use ```get_by_id(<ID>)``` method to get a file information by it's IMDB ID:

```python
>>> from moviedb import IMDB
>>> from imdbmovies import IMDB
>>> imdb = IMDB()
>>> res = imdb.get_by_id("tt12593682")
>>> print(res)
Expand Down Expand Up @@ -163,7 +166,7 @@ Use ```get_by_id(<ID>)``` method to get a file information by it's IMDB ID.
}
```

**3) Searching on IMDB :-**
**3. Searching on IMDB:**

* Use ```search(<name>, year=None, tv=False, person=False)``` method to search a file/movie/tv on IMDB.

Expand All @@ -174,7 +177,7 @@ Use ```get_by_id(<ID>)``` method to get a file information by it's IMDB ID.
_**Recommendation -** Pass ```year``` argument to increase the accuracy to hit requested file._

```python
>>> from moviedb import IMDB
>>> from imdbmovies import IMDB
>>> imdb = IMDB()
>>> res = imdb.search('liger', year=2022)
>>> print(res)
Expand Down Expand Up @@ -221,14 +224,14 @@ _**Recommendation -** Pass ```year``` argument to increase the accuracy to hit r
}
```

**4) Getting a Person/Celebrity Profile Information:-**
**4. Getting a Person/Celebrity Profile Information:**

* Use ```person_by_name(<name>)``` method to get profile info by name from IMDB.
* Use ```person_by_id(<IMDB_ID>)``` method to get profile info by it's ID.


```python
>>> from moviedb import IMDB
>>> from imdbmovies import IMDB
>>> imdb = IMDB()
>>> res = imdb.person_by_name('Rajkummar Rao') #OR imdb.person_by_id("nm3822770")
>>> print(res)
Expand All @@ -244,7 +247,7 @@ _**Recommendation -** Pass ```year``` argument to increase the accuracy to hit r
>>>
```

**5) Language Support:**
**5. Language Support:**

Added the possibiltie to use en language encoding like this:

Expand All @@ -256,20 +259,24 @@ If there is a special alternated name for the used country, it will be passed to
The original Name will be untouched

## Other Useful Methods:
* #### Get Upcoming Movies List :

* #### Get Upcoming Movies List:

```python
from moviedb import IMDB
from imdbmovies import IMDB
imdb = IMDB()
res = imdb.upcoming(region=None)
# returns upcomming movies info as json
```
```region``` is an **Optional argument. Use country ISO codes (eg. IN/US/DE/AE etc.)
to filter results for a particular region.
* #### Getting Popular Movies List by Genre :
The ```popular_movies()``` method will return 50 popular movies results starting from ```start_id```

* #### Getting Popular Movies List by Genre:

The ```popular_movies()``` method will return 50 popular movies results starting from ```start_id```:

```python
from moviedb import IMDB
from imdbmovies import IMDB
imdb = IMDB()
res = imdb.popular_movies(genre=None, start_id=1, sort_by=None)
# returns top 50 popular movies starting from start id
Expand All @@ -279,9 +286,11 @@ res = imdb.popular_movies(genre=None, start_id=1, sort_by=None)
To see ```sort_by``` options visit [Movies by genre - IMDB](https://www.imdb.com/search/title/?genres=sci-fi&explore=title_type,genres)

* #### Getting Popular TV Series List by Genre :
The ```popular_tv()``` method will return 50 popular TV-Series starting from ```start_id```

The ```popular_tv()``` method will return 50 popular TV-Series starting from ```start_id```:

```python
from moviedb import IMDB
from imdbmovies import IMDB
imdb = IMDB()
res = imdb.popular_tv(genre=None, start_id=1, sort_by=None)
# returns top 50 popular TV Series starting from start id
Expand All @@ -291,7 +300,8 @@ res = imdb.popular_tv(genre=None, start_id=1, sort_by=None)
To see ```sort_by``` options visit [TV Series by genre - IMDB](https://www.imdb.com/search/title/?title_type=tv_series,tv_miniseries&genres=action&view=advanced)

## Disclaimer
The moviedb is tested with small amount of data found on [IMDB.com](https://www.imdb.com).

The `imdbmovies`` is tested with small amount of data found on [IMDB.com](https://www.imdb.com).
This package is developed for educational purpose only. The author does not encourage anyone to
use this module for any illegal or un-ethical project/purpose.

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion moviedb/imdb.py → imdbmovies/imdb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
import json
import requests
from PyMovieDb import ImdbParser
from imdbmovies import ImdbParser
from bs4 import BeautifulSoup
from requests.packages.urllib3.exceptions import InsecureRequestWarning

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
long_description = fh.read()

setuptools.setup(
name="moviedb",
version="0.1.0",
name="imdbmovies",
version="0.1.1",
author="safevideo",
description="IMDB API for Python",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/safevideo/moviedb",
url="https://github.com/safevideo/imdbmovies",
packages=setuptools.find_packages(),
zip_safe=False,
install_requires=["beautifulsoup4"]
Expand Down

0 comments on commit 7cbfafa

Please sign in to comment.