本文整理汇总了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()