Skip to content

Commit

Permalink
Upload version 3.0 - 2022/03/20
Browse files Browse the repository at this point in the history
  • Loading branch information
mxnt10 committed Mar 22, 2022
1 parent 6e9a895 commit a4c378f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 5 deletions.
Binary file modified icon_status/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon_status/notify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon_status/original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon_status/warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon_status/withmsg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self):
# Propriedades gerais
self.setWindowTitle(__pagename__)
self.setWindowIcon(QIcon(setIcon()))
self.setMinimumSize(800, 600)
self.setMinimumSize(1024, 768)

# Definições para a visualização da página do webapp
self.view = Browser()
Expand Down Expand Up @@ -170,7 +170,7 @@ def changeStatusBar(self):
def bs(self, htm, parser):
res = BeautifulSoup(htm, parser)
try:
if not __err__ in res.title and res.findAll('div', {'class': '_26lC3'}):
if not __err__ in res.title and res.findAll('img', {'class': 'gb_wc'}):
verifyNotify(self, res)
if __err__ in res.title: # Em caso de erro de conexão o título inicial não se altera
if self.changeTray != 1:
Expand Down Expand Up @@ -352,7 +352,8 @@ def externalBrowser(self):
if not cap_url: # Garantindo que a variável vai ter o link para abrir
cap_url = self.save_url

if cap_url is not None and not 'mail.google.com' in cap_url:
if cap_url is not None and not 'mail.google.com' in cap_url and \
not 'https://www.google.com.br/intl/pt-BR/about/products' in cap_url:
QDesktopServices.openUrl(QUrl(cap_url)) # Abrindo no navegador externo
cap_url = None

Expand Down
4 changes: 2 additions & 2 deletions src/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def notifyMessage(self):
# Essa função pode variar conforme o webapp.
def verifyNotify(self, res):
self.soma = 0
for tag in res.findAll('div', {'class': '_1pJ9J'}):
self.soma += int(tag.getText())
num = [int(temp) for temp in str(res.findAll('span', {'class': 'nU n1'})[0]).split() if temp.isdigit()]
self.soma = num[0]
if self.soma != self.notify and self.soma != 0:
self.notify = self.soma # Necessário para mapear alterações no número de notificações

Expand Down

0 comments on commit a4c378f

Please sign in to comment.