[mythtv-users] Download Finnish providers channel logos at one go

ikke ikke at iki.fi
Tue Sep 21 20:28:47 UTC 2010


For those that want to get channel logos at one go from command line
for channels broadcasted in Finland (by welho):

wget -O- 'http://www.welho.fi/fi/yksityisille/kanavapaketit/kanavalista/'
|  sed 's/>/>\n/g' |sed -n '/width="100".*181801/{p;n;n;n;n;n;p;G}' |
sed -e 's/.*src="\(\/image\/image_gallery[^"]*\).*/wget
"http:\/\/www.welho.fi\1/' | sed -e ':a;$!N;s/\n\(.*\)<.*/" -O
"\1.pic"/;ta;P;D' | sed -ne '/[^"]\.pic/p' |sed -e 's/
*\.pic/.pic/;s/&amp;/\&/g;s/&nbsp;/ /g;s/-O " +*/-O "/' |sh



for i in *.pic ; do s=`file "$i"` ; echo ${s} ; [[ "$s" =~ "GIF" ]] &&
mv -v "$i" "`basename \"$i\" pic`gif"; [[ "$s" =~ "JPEG" ]] && mv -v
"$i" "`basename \"$i\" pic`jpg" ; done


If gmail breaks the lines, those all should be in  two lines. Anyone
willing to update the script to upload those into db automatically?

http://svn.mythtv.org/trac/browser/trunk/mythtv/contrib/icons/fi_icons_xmltvids

- ikke


More information about the mythtv-users mailing list