How to use nntplib efficiently?

Donn Cave donn at u.washington.edu
Tue May 9 15:45:28 EDT 2000


Quoth wmcclain at salamander.com (Bill McClain):
| In <39183DE8.A911F9D3 at erols.com>, ""Edward C. Jones" <edcjones at erols.com>" wrote:
|> I have written various special purpose news-downloading programs.
|> It appears that my code downloads headers slower than Netscape
|> for Linux. What is the best way to download new headers? My ISP
|> does not allow the "newnews" command.
|
| I keep track of the first and last article numbers returned by "group" and
| use "xover" to fetch headers in the ranges I haven't yet retrieved. Normally,
| I get only the range "higher" than my last highest article, but I also
| have a "backfill" mode to fill in gaps in article sequencing, which seems
| to be a big problem these days.
|
| I haven't timed it, but it seems fast to me. Mail me if you would like source.

I have been using
   inst.xhdr(('From', 'Subject', 'Message-ID', 'References'), '1011-1580')

If it's slow, I haven't noticed.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list