473,382 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

nntplib retrieve news://FULL_URL

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/D8*******@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?

Jimmy
Jun 27 '08 #1
2 1132
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/D8*******@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:

<ma**************************************@python.o rg>

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.
Jun 27 '08 #2
Ja*********@gmail.com wrote:
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/D8*******@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.
You should study a little bit NNTP RFCs ;-)
Anyway D8*******@news.ap.org could be the Message-ID of the article, a 'unique'
identifier associated to each article, while the Article Number is unique on
the server (but it changes on different servers).

the nntplib NNTP.article command can accept either Message-ID or Number as
argument, but if you want to use Message-ID you need to enclose it in brackets
<>.

So in your case this query should work:

myNntpObject.article('<D8*******@news.ap.org>')

Regards.
--
Love is an irresistible desire to be irresistibly desired.
_ _ _
| \| |___ _ __ ___ __(_)___
| .` / -_) ' \/ -_|_-< (_-<
|_|\_\___|_|_|_\___/__/_/__/ http://xpn.altervista.org

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rakesh | last post by:
For a particular application of mine, I need to get the messages from usenet , (and group them by each thread) . My startup python code looks as follows. <--- Startup code to read messages from...
2
by: python | last post by:
Hello, How to post a news article with NNTPlib if the news server requires login. I did not find nay login command in nntplib module. Thank you lad.
2
by: Helmut Jarausch | last post by:
Hi I try to regularly extract recent news from some newsgroups. If News is an NNTP object I try (Response,Articles)= News.xover(str(int(Last)+1),'10000000') where 'Last' is the (previously...
1
by: 2Good4You-Veki(Cro) | last post by:
HI, when I want use python nntplib: THEN ERROR IS: Traceback (most recent call last): File "<pyshell#2>", line 1, in -toplevel- s.group('hr.mag.bug') File "C:\Python24\lib\nntplib.py",...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.