View Single Post
Old 02-13-2010, 01:24 PM   #1432
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Flash slideshow code?

Has anyone written code, or is it in any recipe, to grab .jpg images from a flash slideshow? I took a look at html code from the Olympic site above and found an embedded link to :
Code:
http://www.nbcolympics.com/code/flash/photogallery.swf?path=http://www.nbcolympics.com/xmlfeed/photogallery/newsid=412282.xml
The source on that page has this in it:
Spoiler:
412282WARNING: Graphic content. Georgian luger Nodar Kumaritashvili was killed in a crash during a training run Friday at the Whistler Sliding Centre. He was 21 years old.http://www.nbcolympics.com/photos/ga...etruefalseRate this photoHide captionShow captionHide thumbnailsShow thumbnailsofphotosPHOTONextPreviousPlay SlideshowStopLG Nodar KumaritashviliGeorgia412296Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m05.jpg412128Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m15.jpghttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m03.jpghttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m02.jpghttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m05.jpg412288Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m05.jpg412289Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m05.jpg412290Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m05.jpg412291Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m05.jpg412292Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m05.jpg412357ReutersWorkers load luger into ambulancehttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m05.jpg412358ReutersLittle comforthttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m05.jpg412360ReutersStanding guardhttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m05.jpg412362Getty ImagesJacques Roggehttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m05.jpg412363Getty ImagesJacques Roggehttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m05.jpg412364Getty ImagesJohn Furlonghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m05.jpg412359ReutersGeorgian flaghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m05.jpg412295Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m05.jpg412294Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m05.jpg412859Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m05.jpg412860Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m05.jpg412861Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m05.jpg412862Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m05.jpg412891ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m05.jpg412896ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m05.jpg412917ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m05.jpg412934ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m05.jpg

and by changing the m03 to m02 of the .jpg links I get the large photos. Has anyone written a recipe to do this or anything similar?

Thanks.

(BTW, these links go to photos relating to the training accident that killed a luger. They just happened to be the first on the list of flash photo slideshow links.)

Edit:

If this hasn't been done, I'd appreciate thoughts on a reasonable approach to doing this. I was thinking of using an approach like this:
1) the feed has to have use_embedded_content = False to make sure that it goes to the flash slideshow page;
2) then process that page with preprocess_html and BeautifulSoup to remove everything but the link to the page that has the links to the images;
3) then follow to that second page and process it with postprocess_html and BeautifulSoup to display all the images.

This puts an extra page between the images and the feed link, but that could probably be removed with more work.

Comments?

Last edited by Starson17; 02-13-2010 at 02:33 PM.
Starson17 is offline