Merge branch 'haasn-hinttags'
This commit is contained in:
commit
686d49b578
@ -212,6 +212,7 @@ Contributors, sorted by the number of commits in descending order:
|
||||
* adam
|
||||
* Samir Benmendil
|
||||
* Regina Hug
|
||||
* Niklas Haas
|
||||
* Mathias Fussenegger
|
||||
* Marcelo Santos
|
||||
* Jean-Louis Fuchs
|
||||
|
@ -1021,6 +1021,7 @@ class WordHinter:
|
||||
"alt": lambda elem: elem["alt"],
|
||||
"name": lambda elem: elem["name"],
|
||||
"title": lambda elem: elem["title"],
|
||||
"placeholder": lambda elem: elem["placeholder"],
|
||||
"src": lambda elem: elem["src"].split('/')[-1],
|
||||
"href": lambda elem: elem["href"].split('/')[-1],
|
||||
"text": str,
|
||||
@ -1029,7 +1030,8 @@ class WordHinter:
|
||||
extractable_attrs = collections.defaultdict(list, {
|
||||
"img": ["alt", "title", "src"],
|
||||
"a": ["title", "href", "text"],
|
||||
"input": ["name"]
|
||||
"input": ["name", "placeholder"],
|
||||
"button": ["text"]
|
||||
})
|
||||
|
||||
return (attr_extractors[attr](elem)
|
||||
|
Loading…
Reference in New Issue
Block a user