本文整理匯總了Python中_useragent.UserAgentBase.close方法的典型用法代碼示例。如果您正苦於以下問題:Python UserAgentBase.close方法的具體用法?Python UserAgentBase.close怎麽用?Python UserAgentBase.close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類_useragent.UserAgentBase
的用法示例。
在下文中一共展示了UserAgentBase.close方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: close
# 需要導入模塊: from _useragent import UserAgentBase [as 別名]
# 或者: from _useragent.UserAgentBase import close [as 別名]
def close(self):
UserAgentBase.close(self)
if self._response is not None:
self._response.close()
if self._history is not None:
self._history.close()
self._history = None
# make use after .close easy to spot
self.form = None
self.request = self._response = None
self.request = self.response = self.set_response = None
self.geturl = self.reload = self.back = None
self.clear_history = self.set_cookie = self.links = self.forms = None
self.viewing_html = self.encoding = self.title = None
self.select_form = self.click = self.submit = self.click_link = None
self.follow_link = self.find_link = None