tags:

views:

46

answers:

1

I have 200+ Google video codes and am searching for a way of collecting all their associated video titles.

I know I could just type 200+ urls into a browser window and copy and paste, but that's pretty slow going and I'd prefer something automated.

Thanks

+2  A: 

Curl and Grep (and Sed)

for code in 6168784043164674382 -6812164614976718979; do
  curl -s http://video.google.com/videoplay?docid=$code | grep "<div class=titlebar-title>" | sed "s/^<div class=titlebar-title>\(.*\)<\/div>$/\1/g"
done

Obviously this could be done with Perl/Python/PHP/Ruby/whatever with regex. Google video actually has nice class names for their divs.

Stefan Mai