Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

        def register_record_type(rx, record):
    archive_types.append((rx,record))
        


src/h/a/hanzo-warc-tools-0.2/hanzo/warctools/warc.py   hanzo-warc-tools(Download)
import hashlib
from .record import ArchiveRecord,ArchiveParser
from .archive_detect import register_record_type
 
bad_lines = 5 # when to give up looking for the version stamp
 
blank_rx = rx(r'^$')
register_record_type(version_rx, WarcRecord)
register_record_type(blank_rx, WarcRecord)
 

src/h/a/hanzo-warc-tools-0.2/hanzo/warctools/arc.py   hanzo-warc-tools(Download)
from .record import ArchiveRecord,ArchiveParser
from .stream import open_record_stream
from .archive_detect import register_record_type
 
# URL<sp>IP-address<sp>Archive-date<sp>Content-type<sp>
 
 
register_record_type(re.compile('^filedesc://'), ArcRecord)