comparison bin/warc.py @ 58:299e3d0f2310

but skip at eobp is not working (with test 2)
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 12 Jul 2023 19:07:56 +0100
parents 61b0a1582af8
children 5d40d7511374
comparison
equal deleted inserted replaced
57:61b0a1582af8 58:299e3d0f2310
81 elif (parts & 1): 81 elif (parts & 1):
82 OUT=callback(wtype,buf[start_1:eol],1) 82 OUT=callback(wtype,buf[start_1:eol],1)
83 if parts!=1: 83 if parts!=1:
84 # everything from bv= goes here 84 # everything from bv= goes here
85 pass 85 pass
86 else: 86 bp+=length
87 bp+=length
88 print('end of loop',wtype,start_1,bp,eol,length,bl,file=sys.stderr) 87 print('end of loop',wtype,start_1,bp,eol,length,bl,file=sys.stderr)
89 #while not buf.startswith(b'\r\n',bp): 88 #while not buf.startswith(b'\r\n',bp):
90 continue 89 continue
91 bv=memoryview(buf)[start_2:start_2+length] 90 bv=memoryview(buf)[start_2:start_2+length]
92 ii=0 91 ii=0