Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cinemagoer library problem
#14
Ok this is what I came up with. Note, that some entries do not have a date

from imdb import Cinemagoer
from pandas import DataFrame
from tabulate import tabulate


ia = Cinemagoer()
people = ia.search_person('angelina jolie')
person = people[0]
person = ia.get_person(person.personID)
jobs = [job for job in person['filmography'].keys()]
movies = [movie for movie in person['filmography'][jobs[0]]]

data = []

for stuff in movies:
    data.append((stuff.get('title'), str(stuff.get('year')), stuff.movieID))

headers = ['Movie', 'Release', 'Movie ID']
show = tabulate(DataFrame(data), headers=headers, tablefmt='pretty', showindex=False, colalign=('left', 'left', 'left'))
print(show)
output
Output:
+----------------------------------------------+---------+----------+ | Movie | Release | Movie ID | +----------------------------------------------+---------+----------+ | Every Note Played | None | 11351272 | | Maleficent 3 | None | 15410560 | | Maria | None | 22893404 | | Kung Fu Panda 4 | 2024 | 21692408 | | Eternals | 2021 | 9032400 | | Those Who Wish Me Dead | 2021 | 3215824 | | The One and Only Ivan | 2020 | 3661394 | | Come Away | 2020 | 5714470 | | Maleficent: Mistress of Evil | 2019 | 4777008 | | Mon Guerlain: Notes of a Woman | 2017 | 9110568 | | Kung Fu Panda 3 | 2016 | 2267968 | | By the Sea | 2015 | 3707106 | | Maleficent | 2014 | 1587310 | | Kung Fu Panda Po's Winter Wonderland | 2012 | 21360350 | | Kung Fu Panda: Secrets of the Masters | 2011 | 1980162 | | Kung Fu Panda 2 | 2011 | 1302011 | | The Tourist | None | 1243957 | | Kung Fu Panda Holiday | 2010 | 1702433 | | Salt | 2010 | 0944835 | | Wanted | 2008 | 0493464 | | Changeling | 2008 | 0824747 | | Kung Fu Panda | 2008 | 0441773 | | Beowulf | 2007 | 0442933 | | Entourage | 2007 | 0387199 | | A Mighty Heart | 2007 | 0829459 | | The Good Shepherd | 2006 | 0343737 | | Stars in Their Eyes Kids | 2006 | 0363377 | | Mr. & Mrs. Smith | 2005 | 0356910 | | Alexander | 2004 | 0346491 | | The Fever | 2004 | 0368725 | | Shark Tale | 2004 | 0307453 | | Sky Captain and the World of Tomorrow | 2004 | 0346156 | | Taking Lives | 2004 | 0364045 | | Beyond Borders | 2003 | 0294357 | | Korn: Did My Time | 2003 | 8661174 | | Lara Croft: Tomb Raider - The Cradle of Life | 2003 | 0325703 | | Life or Something Like It | 2002 | 0282687 | | Billy Bob Thornton: Angelina | 2001 | 13381238 | | Original Sin | 2001 | 0218922 | | Lara Croft: Tomb Raider | 2001 | 0146316 | | Gone in 60 Seconds | 2000 | 0187078 | | Girl, Interrupted | 1999 | 0172493 | | The Bone Collector | 1999 | 0145681 | | Pushing Tin | 1999 | 0120797 | | Playing by Heart | 1998 | 0145734 | | Hell's Kitchen | 1998 | 0129136 | | Gia | 1998 | 0123865 | | Playing God | 1997 | 0119906 | | The Rolling Stones: Anybody Seen My Baby? | 1997 | 6762286 | | George Wallace | 1997 | 0119189 | | True Women | 1997 | 0118499 | | Mojave Moon | 1996 | 0117070 | | Foxfire | 1996 | 0116353 | | Love Is All There Is | 1996 | 0116928 | | Without Evidence | 1995 | 0176326 | | Hackers | 1995 | 0113243 | | Meat Loaf: Bat Out of Hell II - Picture Show | 1994 | 0364980 | | Meat Loaf: Rock and Roll Dreams Come Through | 1994 | 7023152 | | Alice & Viril | 1993 | 0356342 | | Angela & Viril | 1993 | 0356360 | | The Lemonheads: It's About Time | 1993 | 9145946 | | Widespread Panic: Wonderin' | 1993 | 13381208 | | Cyborg 2: Glass Shadow | 1993 | 0106639 | | Lenny Kravitz: Stand by My Woman | 1991 | 9145838 | | Antonello Venditti: Alta marea | 1990 | 7307196 | | Lookin' to Get Out | 1982 | 0084268 | +----------------------------------------------+---------+----------+
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply


Messages In This Thread
cinemagoer library problem - by lunacy90 - Sep-04-2023, 06:19 PM
RE: cinemagoer library problem - by menator01 - Sep-04-2023, 06:28 PM
RE: cinemagoer library problem - by deanhystad - Sep-04-2023, 06:45 PM
RE: cinemagoer library problem - by lunacy90 - Sep-04-2023, 07:55 PM
RE: cinemagoer library problem - by deanhystad - Sep-04-2023, 08:15 PM
RE: cinemagoer library problem - by menator01 - Sep-05-2023, 12:59 AM
RE: cinemagoer library problem - by deanhystad - Sep-05-2023, 01:41 AM
RE: cinemagoer library problem - by menator01 - Sep-05-2023, 03:24 AM
RE: cinemagoer library problem - by lunacy90 - Sep-05-2023, 10:12 AM
RE: cinemagoer library problem - by lunacy90 - Sep-05-2023, 10:58 AM
RE: cinemagoer library problem - by menator01 - Sep-07-2023, 04:47 PM
RE: cinemagoer library problem - by lunacy90 - Sep-05-2023, 11:58 AM
RE: cinemagoer library problem - by deanhystad - Sep-05-2023, 12:24 PM
RE: cinemagoer library problem - by lunacy90 - Sep-05-2023, 01:30 PM
RE: cinemagoer library problem - by menator01 - Sep-05-2023, 09:30 PM
RE: cinemagoer library problem - by deanhystad - Sep-05-2023, 10:21 PM
RE: cinemagoer library problem - by menator01 - Sep-05-2023, 11:50 PM
RE: cinemagoer library problem - by menator01 - Sep-06-2023, 08:06 AM
RE: cinemagoer library problem - by lunacy90 - Sep-08-2023, 03:16 PM
RE: cinemagoer library problem - by deanhystad - Sep-07-2023, 06:37 PM
RE: cinemagoer library problem - by menator01 - Sep-07-2023, 06:56 PM
RE: cinemagoer library problem - by menator01 - Sep-08-2023, 04:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with importing python-telegram library into the project gandonio 1 1,636 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  Problem with using Crypto library reks2004 2 2,474 Mar-27-2020, 05:38 AM
Last Post: buran
  Problem installing library thunderspeed 2 2,376 Mar-22-2020, 11:04 PM
Last Post: thunderspeed
  Problem importing resource library ChrisM 8 4,049 Oct-23-2019, 01:40 PM
Last Post: ChrisM
  Problem Using Python Library abir99 8 5,478 Nov-21-2017, 03:12 PM
Last Post: sparkz_alot
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,882 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020