How to parse usenet urls?

S

snewman18

I'm trying to parse newsgroup messages, and I need to follow URLs in
this format: news://some.server. I can past them into a newsreader
with no problem, but I want to do it programatically.

I can't figure out how to follow these links - anyone have any ideas?
 
S

snewman18

Are you aware of nntplib?

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)

How can I take the message link '(e-mail address removed)' and follow it?
 
N

Nikita the Spider


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:

How can I take the message link '(e-mail address removed)' and follow it?[/QUOTE]

OK, gotcha. I misunderstood your original question. Perhaps this is just
a synonym for "nntp:"? THis sounds like a dangerous assumption and
hopefully someone more knowledgeable will come along and shoot me down.
=) But when I fire up Ethereal and paste that URL into my browser,
Firefox launches my newsreader client and Ethereal reports that my
client connects to the remote server at the NNTP port (119), sends an
NNTP LIST command and Ethereal identifies the subsequent conversation as
NNTP.

If I were you I'd try handling URLs with nttplib. I bet it will
work.

Sorry I couldn't provide more than guesses. Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top