Merge branch 'haasn-hinttags'

This commit is contained in:
Florian Bruhin 2016-08-09 08:43:47 +02:00
commit 686d49b578
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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)