Skip to main content

PyMovieI is Python Library to fetch movie information and Movie Poster using Webscraping

Project description

PyMovieI

PyMovieI is a Python package which has a PyMovieInfo library for fetching movie informations and poster it works on web scarping and it fetches the data from Wikipedia.

Installation

Use the package manager pip to install PyMovieI.

pip install PyMovieI

Usage

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Movie_Name') # Create Objects of  'PyMovieInfo'

getPoster()

getPoster(name=None,path="") Method 'downloads' Movie Poster and you can rename it as name argumnet passed in method and save it to specific location by providing location as argument in path.

Examples :

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Create Objects of  'PyMovieInfo'
MovieObj.getPoster() #it will download poster in current location and save with the name available on wikipedida(from where data has been fecthed) 
MovieObj.getPoster("My Movie") # it will download poster as My_Movie.jpg or My_Movie.png 
MovieObj.getPoster(path="D:\\posters\\") # it will download poster in D drive posters directory

movie_info

movie_info is attribute of PyMovieInfo class's Object it returns dictionary having movie information in it as title, starring, directed_by, budget, etc.

Examples:

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Create Objects of  
MovieObj.movie_info # Returns dictionary having 
{'Title': ['Venom'], 'Directed by': ['Ruben Fleischer'],
 'Produced by': ['Avi Arad', 'Matt Tolmach', 'Amy Pascal'], 
 'Screenplay by': ['Jeff Pinkner', 'Scott Rosenberg', 'Kelly Marcel'],
 'Story by': ['Jeff Pinkner', 'Scott Rosenberg'], 
 'Based on': ['Todd McFarlane', 'David Michelinie'], 'Starring': ['Tom Hardy', 'Michelle Williams', 
 'Riz Ahmed', 'Scott Haze', 'Reid Scott'], 'Music by': ['Ludwig Göransson'], 
 'Cinematography': ['Matthew Libatique'], 'Edited by': ['Maryann Brandon', 'Alan Baumgarten'],
 'Production company': ['Columbia Pictures', 'Marvel Entertainment', 'Tencent Pictures', 'Arad Productions', 'Matt Tolmach Productions', 'Pascal Pictures'],
 'Distributed by': ['Sony Pictures Releasing'], 
 'Release date': [datetime.datetime(2018, 10, 1, 0, 0)], 'Running time': [112], 'Country': ['United States'], 
 'Language': ['English'],
 'Budget': [{'ammount': 100000000.0, 'currency': '$'}], 
 'Box office': [{'ammount': 856100000.0, 'currency': '$'}]}

title

title is an attribute of PyMovieInfo class's Object it returns list of movie title.

Examples:

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Create Objects of  'PyMovieInfo'
print(MovieObj.title[0]) # will print movie title(output:"Venom")

running_time

running_time is attribute of PyMovieInfo class's object it returns list having movie's running time in minutes.

Examples:

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Creates Object of  'PyMovieInfo'
print(MovieObj.running_time[0]) # will print movie running time in minutes(output:"112")

starring

starring is attribute of PyMovieInfo class's Object it returns list of movie cast

Examples:

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Creates Object of  'PyMovieInfo'
print(MovieObj.starring) # will print movie starring cast's names(output:['Tom Hardy', 'Michelle Williams', 'Riz Ahmed', 'Scott Haze', 'Reid Scott'])

directed_by

directed_by is an attribute of PyMovieInfo class's object it returns list having director names

Examples:

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Create Objects of  'PyMovieInfo'
print(MovieObj.directed_by) # will print movie directer's names(output:['Ruben Fleischer'])

release_date

release_date is an attribute of PyMovieInfo class's object it returns list having release dates(object).

Examples:

from PyMovieI import PyMovieInfo

MovieObj=PyMovieInfo('Venom') # Create Objects of  'PyMovieInfo'
print(MovieObj.release_date) # will print (output:[datetime.datetime(2018, 10, 1, 0, 0)])

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what would you like to change in package PyMovieI.

Please make sure to update tests as appropriate.

License

MIT

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

PyMovieI-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

PyMovieI-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file PyMovieI-0.1.0.tar.gz.

File metadata

  • Download URL: PyMovieI-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for PyMovieI-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0c9a1e4546d52dce93b8edb843d88fcdbef313672e0420775264a101aab9eb3
MD5 61f272422e487e398131b4077b6d666f
BLAKE2b-256 344e951f6e8de332cd767132b07023229c2c10a2b064bbe0f8ce3f8bf0d15461

See more details on using hashes here.

File details

Details for the file PyMovieI-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: PyMovieI-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for PyMovieI-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 587ca4f79b6c95b6552857fe4b0e61765137c1060ba9bd92a28a873fd57e8945
MD5 159438cdb30c69da74fa6976ec2463e2
BLAKE2b-256 c4d14819a18c0a555288e918f93cd1218af142c40ad61b600a36b7b2041d436a

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