__package__ = 'archivebox.parsers' import re from typing import IO, Iterable from datetime import datetime from django.db.models import Model from ..util import ( htmldecode, enforce_types, ) @enforce_types def parse_netscape_html_export(html_file: IO[str], **_kwargs) -> Iterable[Model]: """Parse netscape-format bookmarks export files (produced by all browsers)""" from core.models import Snapshot html_file.seek(0) pattern = re.compile("]*>(.+)", re.UNICODE | re.IGNORECASE) for line in html_file: # example line #