curl -s http://podcastfile | awk -F\" '{for(i=1;i< nf;i++){if($i ~ /mp3$/) print $i}}'/code>>i< nf/code> should be i< nf/code>>>If your system has LibXML2 then it probably also has the python bindings for the same.Nope, it probably doesn’t. Python libraries are not any more standardly installed than CPAN modules.
$ python
Python 2.3.5 (#2, Oct 16 2006, 19:19:48)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libxml2, sys
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named libxml2
>>>
$ locate libxml2
/usr/lib/libxml2.so.2
/usr/lib/libxml2.so.2.6.16
$
feed="http://www.tmbg.com/_media/_pod/podcast.xml"
wget -qO- "$feed" | sed -n '
\:<enclosure:b glom
b
:glom
\:/>:b glommed
N
b glom
:glommed
\:type="audio/mpeg":!b
\:url=":{s:.*url="::
s:".*::
p
}
'
feed="http://www.tmbg.com/_media/_pod/podcast.xml"
wget -qO- "$feed" | sed -n '
\:<enclosure:b glom
b
:glom
\:/>:b glommed
N
b glom
:glommed
\:type="audio/mpeg":!b
\:url=":!b
s:.*url="::
s:".*::
p
'
feed="http://www.tmbg.com/_media/_pod/podcast.xml"
wget -qO- "$feed" | sed -n '
\:<enclosure:!b
:glom
\:/>:b glommed
N
b glom
:glommed
\:type="audio/mpeg":!b
\:url=":!b
s:.*url="::
s:".*::
p
'
posted by ReiToei at 5:48 AM on May 10, 2007