0

I have uploaded some files to usenet using ngpost.

Now, Im having troubles to download that files, I know that sabnzb or nzbget could do the job, but I want to make a downloader "from scratch" just to learn.

from pynzb import nzb_parser

file_nzb = open("/home/pablo/Programacion/Python/descargadorNZB/myfile.nzb").read()

files = nzb_parser.parse(file_nzb)

for nzb_file in files:
    print (nzb_file.subject)
    for group in nzb_file.groups:
        print ('    ' + group)
    for segment in nzb_file.segments[:20]:
        print ('    ' + segment.message_id)
    

That is what I had achieved. the output is:

[1/1] - "ngpost" yEnc (1/3) 1640768
    alt.binaries.etc
    alt.binaries.dc
    es.binaries.bd
    be193e6b25d048a19a94715d961c2484@ngPost
    f0f367e8629d4062981d5becce5296d7@ngPost
    b82b00a982964d87a3a9c70d3c36baeb@ngPost

So... whats next? how can I download the uploaded file???

I have read about nntplib, but I only got something when calling server.article("1640768") after connecting

server = nntplib.NNTP_SSL('news.eweka.nl', port=563, user='xxxxxxxxxx', password='xxxxxx')
server.group("xxxxxxx")

I got the headers, and the body, but, I dont know how to continue to get that file (ngpost) downloaded...

thanks!

uchi
  • 99
  • 9

0 Answers0