Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
- Update userAgent
- Fix #129
  • Loading branch information
rafatosta committed Nov 19, 2022
1 parent a0c9f57 commit 4cb9a14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zapzap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

__whatsapp_url__ = 'https://web.whatsapp.com/'
# Link para pegar o userAgent: http://httpbin.org/user-agent
__user_agent__ = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
__user_agent__ = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"

# iniciando os paths
from PyQt6.QtCore import QFileInfo
Expand Down
5 changes: 4 additions & 1 deletion zapzap/engine/whatsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def closeConversation(self):
document.getElementsByClassName("o--vV wGJyi")[0].style.display = "none";
}
function getMoreOptions() {
if (document.getElementsByClassName("_26lC3").length == 7){
return document.getElementsByClassName("_26lC3")[5];
}
return document.getElementsByClassName("_26lC3")[4];
}
function invokeEscKey() {
Expand All @@ -119,7 +122,7 @@ def closeConversation(self):
invokeEscKey();
return;
}
var index = buttons.length === 9 ? 4 : 2;
var index = buttons.length === 9 ? 2 : 2;
buttons[index].click()
hideOptions();
}, 1);
Expand Down

0 comments on commit 4cb9a14

Please sign in to comment.