项目作者: tarunnsingh

项目描述 :
Fetches top Movies Details from Charts on IMDB
高级语言: Python
项目地址: git://github.com/tarunnsingh/imdb-fetcher.git
创建时间: 2021-01-06T11:16:37Z
项目社区:https://github.com/tarunnsingh/imdb-fetcher

开源协议:

下载


:memo: IMDB Chart Fetcher

Gets you the information of top movies from IMDB.

:pushpin: Tested URLs

  1. https://www.imdb.com/india/top-rated-indian-movies
  2. https://www.imdb.com/india/top-rated-tamil-movies
  3. https://www.imdb.com/india/top-rated-telugu-movies

:bookmark: Steps to RUN Locally. (Tested on Pyhton 3.6.0 and PIP 9.0.1)

  • Clone the repo, and browse in it.
  • Create a Virtual Environment. py -m venv env.
  • Activate the Environment. env\Scripts\activte.bat or env\Scripts\Activte.ps1 (if using Powershell)
  • Install modules. pip install -r requirements.txt
  • Run the script and Add the url (any one from above 3) as first argument. Add second argument which is the count (1, 2, 3 …). Sample Request:

python imdb_chart_fetcher.py 'https://www.imdb.com/india/top-rated-indian-movies' 3

OR run the SHELL Script:
imdb_chart_fetcher.sh 'https://www.imdb.com/india/top-rated-indian-movies' 3

This returns the following response.

  1. [
  2. {
  3. "title": "Pather Panchali",
  4. "movie_release_year": "1955",
  5. "imdb_rating": "8.6",
  6. "summary": "Impoverished priest Harihar Ray, dreaming of a better life for himself and his family, leaves his rural Bengal village in search of work.",
  7. "duration": "2h 5min",
  8. "genre": "Drama"
  9. },
  10. {
  11. "title": "Hanky Panky",
  12. "movie_release_year": "1979",
  13. "imdb_rating": "8.6",
  14. "summary": "A man's simple lie to secure his job escalates into more complex lies when his orthodox boss gets suspicious.",
  15. "duration": "2h 24min",
  16. "genre": "Comedy, Romance"
  17. },
  18. {
  19. "title": "Raatchasan",
  20. "movie_release_year": "2018",
  21. "imdb_rating": "8.7",
  22. "summary": "A sub-inspector sets out in pursuit of a mysterious serial killer who targets teen school girls and murders them brutally.",
  23. "duration": "2h 50min",
  24. "genre": "Action, Crime, Thriller"
  25. }
  26. ]

Additional Notes:

The Script is configured to save the Latest JSON response inside movie_reccords folder as a CSV file.

Thanks! :star: