mirror of https://github.com/scrapy/scrapy.git
Fixed formatting issues
This commit is contained in:
parent
65744c2199
commit
ff5f717f7a
|
|
@ -168,15 +168,17 @@ def _get_clickable(clickdata, form):
|
|||
if the latter is given. If not, it returns the first
|
||||
clickable element found
|
||||
"""
|
||||
print("form =", form.__dict__)
|
||||
clickables = [
|
||||
el for el in form.xpath(
|
||||
'descendant::*[(self::input or self::button)'
|
||||
' and re:test(@type, "^submit$", "i")]'
|
||||
'|descendant::*[(self::input or self::button)'
|
||||
' and re:test(@type, "^image$", "i")]'
|
||||
'|descendant::button[not(@type)]',
|
||||
namespaces={"re": "http://exslt.org/regular-expressions"})
|
||||
'descendant::*[(self::input or self::button)'
|
||||
' and re:test(@type, "^submit$", "i")]'
|
||||
'|descendant::*[(self::input or self::button)'
|
||||
' and re:test(@type, "^image$", "i")]'
|
||||
'|descendant::button[not(@type)]',
|
||||
namespaces={"re": "http://exslt.org/regular-expressions"})
|
||||
]
|
||||
print("clickables =", clickables)
|
||||
if not clickables:
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue