def robotsrulesetOfDomain(self, domain):
		'''检查domain是否在数据库中,
			否 --> (False, None)
			是 --> (True, 数据库中存储的robots.txt内容)
		'''
		exist = False
		cur = self.conn.cursor()
		# 是否存在
		cur.execute("SELECT 1 FROM Domains WHERE domain=?", (domain,))
		if cur.fetchone() :
			exist = True
		# 存在的话,结果是什么
		cur.execute("SELECT rules FROM Domains,Rulesets "
			"WHERE domain=? AND Domains.did=Rulesets.did"
			,(domain,) )
		ruleset = cur.fetchone()
		return (exist, ruleset)
def _make_proxy(self, key, match):
        proxy_type = match.group("type")
        key = match.group("key").strip()
        if proxy_type == "env":
            proxy = EnvProxy(key)
        else:
            proxy = ResolverMethodProxy(self._resolver, proxy_type, key)
        filters = [f for f in [rf.strip() for rf in match.group("filters").split("|")] if f]
        for filter_name in filters:
            if filter_name == "jsondecode":
                proxy = JSONDecodeFilter(proxy)
            elif filter_name == "base64decode":
                proxy = Base64DecodeFilter(proxy)
            elif filter_name.startswith("element:"):
                key = filter_name.split(":", 1)[-1]
                proxy = ElementFilter(key, proxy)
            else:
                raise ValueError("Unknown filter %s", filter_name)
        return proxy