本文整理匯總了Python中browser.Browser方法的典型用法代碼示例。如果您正苦於以下問題:Python browser.Browser方法的具體用法?Python browser.Browser怎麽用?Python browser.Browser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類browser
的用法示例。
在下文中一共展示了browser.Browser方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setUp
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def setUp(self):
self.b = Browser()
self.b.start()
示例2: __init__
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def __init__(self, items, random_agent=False, debug=False):
self.items = items
self.debug = debug
self.browser = Browser(debug=debug)
if random_agent:
self.browser.set_random_user_agent()
示例3: __init__
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def __init__(self):
self.browser = Browser()
self.start_browser()
self.logged_in = False
示例4: __init__
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def __init__(self):
self.browser = Browser()
示例5: __init__
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def __init__(self, query, random_agent=False, debug=False):
self.query = query
self.debug = debug
self.browser = Browser(debug=debug)
self._page = 0
self.eor = False
self.results_info = None
self._results_per_page = 10
if random_agent:
self.browser.set_random_user_agent()
示例6: __init__
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def __init__(self, query, random_agent=False, debug=False, lang="en", tld="com", re_search_strings=None):
self.query = query
self.debug = debug
self.browser = Browser(debug=debug)
self.results_info = None
self.eor = False # end of results
self._page = 0
self._first_indexed_in_previous = None
self._filetype = None
self._last_search_url = None
self._results_per_page = 10
self._last_from = 0
self._lang = lang
self._tld = tld
if re_search_strings:
self._re_search_strings = re_search_strings
elif lang == "de":
self._re_search_strings = ("Ergebnisse", "von", u"ungefähr")
elif lang == "es":
self._re_search_strings = ("Resultados", "de", "aproximadamente")
# add more localised versions here
else:
self._re_search_strings = ("Results", "of", "about")
if random_agent:
self.browser.set_random_user_agent()
示例7: __init__
# 需要導入模塊: import browser [as 別名]
# 或者: from browser import Browser [as 別名]
def __init__(self, query, random_agent=False, debug=False, page=0):
self.query = query
self.debug = debug
self.browser = Browser(debug=debug)
self.results_info = None
self.eor = False # end of results
self._page = page
self._results_per_page = 10
self._last_from = 0
if random_agent:
self.browser.set_random_user_agent()