def load(self):
con = sqlite3.connect(self.tmp_cookie_file)<EOL>cur = con.cursor()<EOL>try:<EOL><INDENT>cur.execute('<STR_LIT>'<EOL>'<STR_LIT>'.format(self.domain_name))<EOL><DEDENT>except sqlite3.OperationalError:<EOL><INDENT>cur.execute('<STR_LIT>'<EOL>'<STR_LIT>'.format(self.domain_name))<EOL><DEDENT>cj = http.cookiejar.CookieJar()<EOL>for item in cur.fetchall():<EOL><INDENT>host, path, secure, expires, name = item[:<NUM_LIT:5>]<EOL>value = self._decrypt(item[<NUM_LIT:5>], item[<NUM_LIT:6>])<EOL>c = create_cookie(host, path, secure, expires, name, value)<EOL>cj.set_cookie(c)<EOL><DEDENT>con.close()<EOL>return cj<EOL>
Load sqlite cookies into a cookiejar