def insertWebsite(self, url, domain):
		'''增加一个网页,标记为未访问,并对相应的domain增加其入度'''
		cur = self.conn.cursor()
		cur.execute("SELECT 1 FROM Domains WHERE domain=?", (domain,))
		result = cur.fetchone()
		if not result:
			# 未有对应domain记录, 先创建domain, 把入度设为1
			if VERBOSE:
				print 'Spot Domain:',domain
			self.insertDomain(domain, indegree=1)
			cur.execute("SELECT did FROM Domains WHERE domain=?", (domain,))
			did = cur.fetchone()[0]
		else:
			did = result[0]
			# 对应的domain记录已经存在, 对其入度+1
			cur.execute("UPDATE Domains SET outdegree=outdegree+1 WHERE domain=?", (domain,))

		cur.execute("INSERT INTO Websites VALUES (NULL,?,?,NULL,0)", (did, url,))
		# 写入到文件
		self.conn.commit()
def __init__(
        self,
        base,
        filename="",
        data=None,
        ignore_extras=False,
        ignore_installed=False,
        skip_unavailable=False
    ):
        """
        :param base: the dnf base
        :param filename: the filename to load the transaction from (conflicts with the 'data' argument)
        :param data: the dictionary to load the transaction from (conflicts with the 'filename' argument)
        :param ignore_extras: whether to ignore extra package pulled into the transaction
        :param ignore_installed: whether to ignore installed versions of packages
        :param skip_unavailable: whether to skip transaction packages that aren't available
        """

        self._base = base
        self._filename = filename
        self._ignore_installed = ignore_installed
        self._ignore_extras = ignore_extras
        self._skip_unavailable = skip_unavailable

        if not self._base.conf.strict:
            self._skip_unavailable = True

        self._nevra_cache = set()
        self._nevra_reason_cache = {}
        self._warnings = []

        if filename and data:
            raise ValueError(_("Conflicting TransactionReplay arguments have been specified: filename, data"))
        elif filename:
            self._load_from_file(filename)
        else:
            self._load_from_data(data)