Skip to content

Commit

Permalink
readded content to rename
Browse files Browse the repository at this point in the history
  • Loading branch information
QADavidCalvo committed May 24, 2024
1 parent 3ac85c7 commit 9f29662
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion kebbie/emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
"Search": "enter",
"return": "enter",
"Enter": "enter",
"Delete.": "backspace",
"To symbols.": "numbers",
"Symbol keyboard": "numbers",
"Symbols": "numbers",
"Symbols and numbers": "numbers",
Expand Down Expand Up @@ -1092,6 +1094,7 @@ def get_suggestions(self) -> List[str]:
suggestions = []

# Get the raw content as text, weed out useless elements
'''''''''
section = self.driver.page_source.split("<javaClass")
for line in section.split("\n"):
Expand All @@ -1101,6 +1104,18 @@ def get_suggestions(self) -> List[str]:
suggestions.append(html.unescape(m.group(1)))
return suggestions
'''''''''

for data in self.driver.page_source.split("<javaClass"):
if KEYBOARD_PACKAGE[YANDEX] in data and "content-desc" in data:
sections = data.split("<javaClass ")
for section in sections[1:]:
m = re.search(r"content-desc=\"([^\"]*)\"", section)
if m:
suggestions.append(html.unescape(m.group(1)))
break

return suggestions


class TappaLayoutDetector(LayoutDetector):
Expand Down Expand Up @@ -1185,4 +1200,4 @@ def get_suggestions(self) -> List[str]:
if m:
suggestions.append(html.unescape(m.group(1)))

return suggestions
return suggestions

0 comments on commit 9f29662

Please sign in to comment.