# Path: pyhindsight/utils.py
# def dict_factory(cursor, row):
# def text_factory(row_data):
# def open_sqlite_db(chrome, database_path, database_name):
# def format_plugin_output(name, version, items):
# def format_meta_output(name, content):
#     def default(self, obj):
# def to_datetime(timestamp, timezone=None):
# def friendly_date(timestamp):
# def get_ldb_records(ldb_path, prefix=''):
# def read_varint(source):
# def read_string(input_bytes, ptr):
# def read_int32(input_bytes, ptr):
# def read_int64(input_bytes, ptr):
# class MyEncoder(json.JSONEncoder):


import hashlib
import logging
import sqlite3
import sys
import urllib.parse
from pyhindsight import utils
                    self.structure[database][table['name']].append(column['name'])

    @staticmethod
    def dict_factory(cursor, row):
        d = {}
        for idx, col in enumerate(cursor.description):
            d[col[0]] = row[idx]
        return d

    def build_md5_hash_list_of_origins(self):
        for artifact in self.parsed_artifacts:
            if isinstance(artifact, self.HistoryItem):
                domain = urllib.parse.urlparse(artifact.url).hostname
                # Some URLs don't have a domain, like local PDF files
                if domain:
                    self.origin_hashes[hashlib.md5(domain.encode()).hexdigest()] = domain

    class HistoryItem(object):
        def __init__(self, item_type, timestamp, profile, url=None, name=None, value=None, interpretation=None):
            self.row_type = item_type
            self.timestamp = timestamp
            self.profile = profile
            self.url = url
            self.name = name
            self.value = value
            self.interpretation = interpretation

        def __lt__(self, other):
            return self.timestamp < other.timestamp


# Path: pyhindsight/utils.py
# def dict_factory(cursor, row):
# def text_factory(row_data):
# def open_sqlite_db(chrome, database_path, database_name):
# def format_plugin_output(name, version, items):
# def format_meta_output(name, content):
#     def default(self, obj):
# def to_datetime(timestamp, timezone=None):
# def friendly_date(timestamp):
# def get_ldb_records(ldb_path, prefix=''):
# def read_varint(source):
# def read_string(input_bytes, ptr):
# def read_int32(input_bytes, ptr):
# def read_int64(input_bytes, ptr):
# class MyEncoder(json.JSONEncoder):


# Path: pyhindsight/browsers/webbrowser.py
import hashlib
import logging
import sqlite3
import sys
import urllib.parse
from pyhindsight import utils

                    self.structure[database][table['name']].append(column['name'])

    @staticmethod
    def dict_factory(cursor, row):
        d = {}
        for idx, col in enumerate(cursor.description):
            d[col[0]] = row[idx]
        return d

    def build_md5_hash_list_of_origins(self):
        for artifact in self.parsed_artifacts:
            if isinstance(artifact, self.HistoryItem):
                domain = urllib.parse.urlparse(artifact.url).hostname
                # Some URLs don't have a domain, like local PDF files
                if domain:
                    self.origin_hashes[hashlib.md5(domain.encode()).hexdigest()] = domain

    class HistoryItem(object):
        def __init__(self, item_type, timestamp, profile, url=None, name=None, value=None, interpretation=None):
            self.row_type = item_type
            self.timestamp = timestamp
            self.profile = profile
            self.url = url
            self.name = name
            self.value = value
            self.interpretation = interpretation

        def __lt__(self, other):
            return self.timestamp < other.timestamp


        def __iter__(self):