Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _find_element(self, tag, href_attr, href_extract,
content, id,
href_pattern,
index, verbose):
content_pat = utils.make_pattern(content)
id_pat = utils.make_pattern(id)
href_pat = utils.make_pattern(href_pattern)
def printlog(s):
if verbose:
print(s)
found_links = []
total_links = 0
for element in self.html.find_all(tag):
el_html = str(element)
el_content = element.decode_contents()
attrs = element
if verbose:
printlog('Element: %r' % el_html)
if not attrs.get(href_attr):
printlog(' Skipped: no %s attribute' % href_attr)
continue
def call_FUT(self, obj):
from webtest.utils import make_pattern
return make_pattern(obj)
def _find_element(self, tag, href_attr, href_extract,
content, id,
href_pattern,
index, verbose):
content_pat = utils.make_pattern(content)
id_pat = utils.make_pattern(id)
href_pat = utils.make_pattern(href_pattern)
def printlog(s):
if verbose:
print(s)
found_links = []
total_links = 0
for element in self.html.find_all(tag):
el_html = str(element)
el_content = element.decode_contents()
attrs = element
if verbose:
printlog('Element: %r' % el_html)
if not attrs.get(href_attr):
def _find_element(self, tag, href_attr, href_extract,
content, id,
href_pattern,
index, verbose):
content_pat = utils.make_pattern(content)
id_pat = utils.make_pattern(id)
href_pat = utils.make_pattern(href_pattern)
def printlog(s):
if verbose:
print(s)
found_links = []
total_links = 0
for element in self.html.find_all(tag):
el_html = str(element)
el_content = element.decode_contents()
attrs = element
if verbose:
printlog('Element: %r' % el_html)
if not attrs.get(href_attr):
printlog(' Skipped: no %s attribute' % href_attr)