How to parse usenet urls?

snewman18 at gmail.com snewman18 at gmail.com
Wed May 30 23:26:32 EDT 2007


> Are you aware of nntplib?
>
> http://docs.python.org/lib/module-nntplib.html

I am, but I once I got into the article itself, I couldn't figure out
how to "call" a link inside the resulting message text:

import nntplib
username = my username
password = my password
nntp_server = 'newsclip.ap.org'
n = nntplib.NNTP(nntp_server, 119, username, password)
n.group('ap.spanish.online.headlines')

m_id = n.next()[1]
n.article(m_id)


I'll get output like this headline and full story message link:
(truncated for length)

>>> ... 'Castro: Bush desea mi muerte, pero las ideas no se matan', 'news://newsclip.ap.org/D8PE2G6O0@news.ap.org', ...

How can I take the message link 'news://newsclip.ap.org/
D8PE2G6O0 at news.ap.org' and follow it?





More information about the Python-list mailing list