video clip or trailer

33 views
Skip to first unread message

Degenerate Tech

unread,
Dec 12, 2020, 3:39:42 AM12/12/20
to imdbpy-users
how to get video clips or trailer of any movie?

Davide Alberani

unread,
Dec 12, 2020, 10:41:43 AM12/12/20
to imdbpy...@googlegroups.com
Hi,
at this moment, you can just parse
https://www.imdb.com/title/tt0133093/externalsites with something like
that:
#!/usr/bin/env python3

from imdb import IMDb
ia = IMDb()
matrix = ia.get_movie('0133093')
ia.update(matrix, 'external sites')
print(matrix.get('video clips and trailers'))

Not sure if that's what you mean with "video clips".
The movie pictures are trailers are not available, right now; a parser
can be written, but not
so easily since they are paginated.

As always, any help is welcome.

On Sat, Dec 12, 2020 at 9:39 AM Degenerate Tech <sksah...@gmail.com> wrote:
>
> how to get video clips or trailer of any movie?
>
> --
> You received this message because you are subscribed to the Google Groups "imdbpy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to imdbpy-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/imdbpy-users/97edb535-1f7e-4320-8a2f-b2da43620fben%40googlegroups.com.



--
Davide Alberani <davide....@gmail.com> [PGP KeyID: 0x3845A3D4AC9B61AD]
http://www.mimante.net/

Degenerate Tech

unread,
Dec 12, 2020, 10:46:39 AM12/12/20
to imdbpy-users
okkk... ..a=imdbobj.get_movie(x) this line takes lots of time ...
very slow running .
imdbobj=imdb.IMDb()
m=imdbobj.get_top250_movies()
for j in range(len(m)):
          print(m[j])
  x=m[j].movieID
a=imdbobj.get_movie(x)
print(j,'################',a)

Degenerate Tech

unread,
Dec 12, 2020, 12:36:26 PM12/12/20
to imdbpy-users
from imdb import IMDb
ia = IMDb()
top250Movies = ia.get_top250_movies()
for i in top250Movies:
a=i.items()
print(i,a)

###data from above code is enough for my work but ..i want cover image of movie...its it possible using above code ?

. i dont want to use .a=imdbobj.get_movie(x) because it takes large time 

On Saturday, December 12, 2020 at 9:11:43 PM UTC+5:30 davide....@gmail.com wrote:

Davide Alberani

unread,
Dec 20, 2020, 4:12:44 AM12/20/20
to imdbpy...@googlegroups.com
Hi,
once you have an instance of a Movie object you can call the .keys() method to
get the current list of available information. If what you need is
not already present
in the results, you will need to update the object to fetch the info you need.
> To view this discussion on the web visit https://groups.google.com/d/msgid/imdbpy-users/86c7e042-d6af-4603-96f5-ebbc595dfbb1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages