nntplib retrieve news://FULL_URL

David wizzardx at gmail.com
Sat Apr 26 06:20:33 EDT 2008


> So I have established a connection to an nntp server and I am
>  retrieving articles to other articles on the server such as
>  news://newsclip.ap.org/D8L4MFAG0@news.ap.org
>
>  Now I am wondering how I query for that article based off of the url?
>
>  I assume D8L4MFAG0 is an id of some sort but when I try and retrieve
>  that article via myNntpObject.article('D8L4MFAG0') I get an error of
>  423 Bad article number. Which makes sense as all the other article
>  numbers are integers.
>
>  D8L4MFAG0 actually looks like a doc-id value for an NITF article
>  stored on the NNTP server which I am retrieving content off of.
>
>  Anyone have any ideas on how I fetch this content?

Have a look at the 'Message-ID' header of articles on the server. They
usually start and end with "<" and end with ">".

An example from comp.lang.python:

<mailman.1056397442.10470.clpa-moderators at python.org>

You probably got the "423 Bad article number" error because there
wasn't a "<" and ">" in your message ID, so it tried to parse it as an
article number instead.

I couldn't check your example because newsclip.ap.org requires a login.

David.



More information about the Python-list mailing list