Sep-05-2023, 09:30 PM
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
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags