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 get_organizations(self):
        legis = Organization('Minnesota Legislature', classification='legislature')

        upper = Organization('Minnesota Senate', classification='upper',
                             parent_id=legis._id)
        lower = Organization('Minnesota House of Representatives',
                             classification='lower', parent_id=legis._id)

        for n in range(1, 68):
            upper.add_post(label=str(n), role='Senator',
                           division_id='ocd-division/country:us/state:mn/sldu:{}'.format(n))
            lower.add_post(label=str(n) + 'A', role='Representative',
                           division_id='ocd-division/country:us/state:mn/sldl:{}a'.format(n))
            lower.add_post(label=str(n) + 'B', role='Representative',
                           division_id='ocd-division/country:us/state:mn/sldl:{}b'.format(n))

        yield legis
        yield upper
        yield lower