MyTrailers (2 Viewers)

lstepnio

Portal Member
July 24, 2008
14
0
I discovered some unadvertised XML feeds a while ago while trying to automate downloading trailers from the Apple site. I've been trying to find some reliable (no page scraping) method to automatically download trailers. In my case I only wanted to download 1080p trailers so a bit of manupulation of the RSS data to download the 1080p files seems to work most of the time.

I think this is easy button data source for what you guys are trying to accomplish so I figured I would share.

Code:
http://www.apple.com/trailers/home/xml/current.xml
http://www.apple.com/trailers/home/xml/current_720p.xml
 

lstepnio

Portal Member
July 24, 2008
14
0
I'm really glad to help.

I'll share another trick for easily downloading trailers from the Quicktime website. This method doesn't give you any metadata but I think some people might appreciate the idea and how simple it is.

Code:
wget -c -nc `xmlstarlet sel --net -D -T -t -m "/records/movieinfo/preview" -v "large" -o " " http://www.apple.com/trailers/home/xml/current_720p.xml`

Code:
lstepnio@lstepnio:~/tmp/trailers$ wget -c -nc `xmlstarlet sel --net -D -T -t -m "/records/movieinfo/preview" -v "large" -o " " http://www.apple.com/trailers/home/xml/current_720p.xml`
File `australia-tlrc_a720p.mov' already there; not retrieving.

File `baby_mama-tlr1_a720p.mov' already there; not retrieving.

File `baghead_a720p.mov' already there; not retrieving.

File `bangkok_dangerous_a720p.mov' already there; not retrieving.

File `beverly_hills_chihuahua-tsr_a720p.mov' already there; not retrieving.

File `blindness-tlr1_a720p.mov' already there; not retrieving.

File `boy_a-tlr1_a720p.mov' already there; not retrieving.

File `brick_lane_a720p.mov' already there; not retrieving.

File `brideshead_revisited_a720p.mov' already there; not retrieving.

File `burn_after_reading-tlr1b_a720p.mov' already there; not retrieving.

File `choke_a720p.mov' already there; not retrieving.

File `city_of_ember-tlr_a720p.mov' already there; not retrieving.

File `thecuriouscaseofbenjaminbutton-tlr1_a720p.mov' already there; not retrieving.

File `the_dark_knight-tlr3_a720p.mov' already there; not retrieving.

File `earthstoodstill-tlre_a720p.mov' already there; not retrieving.

File `defiance_a720p.mov' already there; not retrieving.

File `disaster_movie-tlr1b_a720p.mov' already there; not retrieving.

File `the_duchess_a720p.mov' already there; not retrieving.

File `eagle_eye-tlr1_a720p.mov' already there; not retrieving.

File `encountersattheendoftheworld_a720p.mov' already there; not retrieving.

File `felon_a720p.mov' already there; not retrieving.

File `finding_amanda_a720p.mov' already there; not retrieving.

File `flash_of_genius-tlr1_a720p.mov' already there; not retrieving.

--13:39:14--  http://movies.apple.com/movies/sony/frozen_river/frozen_river_a720p.mov
           => `frozen_river_a720p.mov'
Resolving movies.apple.com... 65.32.34.40, 65.32.34.27
Connecting to movies.apple.com|65.32.34.40|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 52,328,230 (50M) [video/quicktime]

100%[=================================================================================================================>] 52,328,230     6.32M/s    ETA 00:00

13:39:23 (5.64 MB/s) - `frozen_river_a720p.mov' saved [52328230/52328230]

--13:39:23--  http://movies.apple.com/movies/wb/get_smart/get_smart-tlr4_a720p.mov
           => `get_smart-tlr4_a720p.mov'
Reusing existing connection to movies.apple.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 76,779,371 (73M) [video/quicktime]

Code:
lstepnio@lstepnio:~/tmp/trailers$ ls -al
total 1163972
drwxr-xr-x 2 lstepnio lstepnio     4096 2008-07-28 13:39 .
drwxr-xr-x 3 lstepnio lstepnio     4096 2008-07-28 13:25 ..
-rw-r--r-- 1 lstepnio lstepnio 47098131 2008-05-19 01:15 australia-tlrc_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 70432459 2008-01-25 15:20 baby_mama-tlr1_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 61422697 2008-05-12 19:08 baghead_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 67173300 2008-04-04 15:34 bangkok_dangerous_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 41282415 2008-05-05 11:40 beverly_hills_chihuahua-tsr_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 75768822 2008-07-08 20:28 blindness-tlr1_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 60720955 2008-06-16 19:59 boy_a-tlr1_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 57022291 2008-04-16 17:40 brick_lane_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 72195111 2008-05-02 13:17 brideshead_revisited_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 52938951 2008-07-11 19:32 burn_after_reading-tlr1b_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 61793117 2008-06-05 17:50 choke_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 49078606 2008-05-23 18:58 city_of_ember-tlr_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 59242644 2008-01-31 12:52 defiance_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 43157495 2008-07-16 18:31 disaster_movie-tlr1b_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 35740947 2008-06-13 19:31 eagle_eye-tlr1_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 52255928 2008-07-03 18:41 earthstoodstill-tlre_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 52988500 2008-06-30 20:49 encountersattheendoftheworld_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 29566323 2008-07-15 18:15 felon_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 12025834 2008-07-28 13:35 finding_amanda_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 18258471 2008-07-28 13:35 flash_of_genius-tlr1_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 52328230 2008-07-03 20:02 frozen_river_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 20266075 2008-07-28 13:39 get_smart-tlr4_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 44036517 2008-07-28 13:29 thecuriouscaseofbenjaminbutton-tlr1_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio  6534540 2008-07-28 13:33 the_dark_knight-tlr3_a720p.mov
-rw-r--r-- 1 lstepnio lstepnio 47204306 2008-01-31 12:51 the_duchess_a720p.mov

This method is using wget and xmlstarlet and the simple command can run out of any task scheduler like cron and whatever it's called on Windows. There are win32 binaries available for wget and xmlstarlet:

SourceForge.net: Files

and I'm pretty sure this project had a good win32 build of wget:

SourceForge.net: Files
 

LRFalk01

Portal Pro
August 27, 2007
257
92
39
Home Country
United States of America United States of America
Thanks for your insight. .net has things similar to wget, so it will not be hard for me to pull the xml. I just have to decide if/how I want to tackle this. I am finding that the apple backend is very nice. For example box office top ten:

http://www.apple.com/moviesxml/h/boxoffice_include.xml

dark knight movie info:

http://www.apple.com/moviesxml/s/wb/thedarkknight/index.xml

there are different xmls that sort all of their movies by genre, studio . . . I do not think it would be overly difficult to get this working.

I am going to spend a few days working on the xml parcing backend, but I think this could be grand.

Thank you very much.
 

sleepycol

Portal Pro
June 2, 2006
540
39
Home Country
United Kingdom United Kingdom
Hi,

Do the links in the xml files which point to the movies actually allow streaming? When I cut and paste the link into internet explorer the file downloads before it plays, so it doesn't stream the trailer.

Wasn't sure if this was an issue or if you can get those links to stream?


Cheers,
Colin
 

LRFalk01

Portal Pro
August 27, 2007
257
92
39
Home Country
United States of America United States of America
Base URL
Code:
http://www.apple.com/

Genres

/moviesxml/g/action_and_adventure_1.xml
/moviesxml/g/comedy_1.xml
/moviesxml/g/documentary_1.xml
/moviesxml/g/drama_1.xml
/moviesxml/g/family_1.xml
/moviesxml/g/fantasy_1.xml
/moviesxml/g/foreign_1.xml
/moviesxml/g/horror_1.xml
/moviesxml/g/musical_1.xml
/moviesxml/g/romance_1.xml
/moviesxml/g/science_fiction_1.xml
/moviesxml/g/thriller_1.xml


Studios

/moviesxml/s/fox/index_1.xml
/moviesxml/s/dreamworks/index_1.xml
/moviesxml/s/focus_features/index_1.xml
/moviesxml/s/fox_searchlight/index_1.xml
/moviesxml/s/independent/index_1.xml
/moviesxml/s/lions_gate/index_1.xml
/moviesxml/s/mgm/index_1.xml
/moviesxml/s/magnolia/index_1.xml
/moviesxml/s/miramax/index_1.xml
/moviesxml/s/newline/index_1.xml
/moviesxml/s/paramount/index_1.xml
/moviesxml/s/paramount_vantage/index_1.xml
/moviesxml/s/picturehouse/index_1.xml
/moviesxml/s/rogue_pictures/index_1.xml
/moviesxml/s/sony_pictures/index_1.xml
/moviesxml/s/sony/index_1.xml
/moviesxml/s/touchstone/index_1.xml
/moviesxml/s/universal/index_1.xml
/moviesxml/s/disney/index_1.xml
/moviesxml/s/wb/index_1.xml
/moviesxml/s/warner_independent_pictures/index_1.xml
/moviesxml/s/weinstein/index_1.xml

Code:
http://www.apple.com/moviesxml/h/boxoffice_include.xml

Code:
http://www.apple.com/moviesxml/h/openings_include.xml

I think this is pretty much the heart of Apple's movie database.
 

armandp

Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    i'm gonna invest some time in making MyTrailers work with the Apple Trailer site (i'm using the MyTrailer trunk from SVN as my starting point)
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    I pm'd LRFalk01 about it and i'll probably be submitting patches on the Apple Trailers addition and he can focus on the overall plugin and the yahoo part. I just wanna help him revive this plugin asap :)
     

    LRFalk01

    Portal Pro
    August 27, 2007
    257
    92
    39
    Home Country
    United States of America United States of America
    check this out: MovieTimes Stand-Alone - MTSA

    This is awesome. I'd probably use this little app if I were to incorporate Apple into my plugin. You may want to take a look at some of the source armandp . . . although it is in VB
     

    Users who are viewing this thread

    Top Bottom