Skip to content

Commit

Permalink
Fix bug show captcha
Browse files Browse the repository at this point in the history
  • Loading branch information
artyl committed Oct 29, 2020
1 parent 2c21b90 commit c05705b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 34 deletions.
3 changes: 3 additions & 0 deletions changelist.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ __Автономная версия__:
Очередная попытка починить плагин mosenergosbyt для ряда случаев (при участии dimon_s2020)
Для плагинов через хром исправлена работа с другими браузерами на движке cromium (edge, yandex, brave и т.п., опера хоть и на хромиуме но нормально не заработала)
Плагин yota теперь тоже через хром

## mbplugin 0.99.24 (28.10.20) Fix bug show captcha
Исправление ошибки показа браузера (багрепорт comr)
8 changes: 5 additions & 3 deletions plugin/pyppeteeradd.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ def hide_chrome(hide=True):
'Прячем или показываем окно хрома'
def enumWindowFunc(hwnd, windowList):
""" win32gui.EnumWindows() callback """
text = win32gui.GetWindowText(hwnd)
className = win32gui.GetClassName(hwnd)
text = win32gui.GetWindowText(hwnd).lower()
className = win32gui.GetClassName(hwnd).lower()
_, pid = win32process.GetWindowThreadProcessId(hwnd)
try: # ??? text.lower().find('chrome')>=0
if text != '' and 'remote-debugging-port' in ''.join(psutil.Process(pid).cmdline()):
if (text != '' and 'remote-debugging-port' in ''.join(psutil.Process(pid).cmdline())
and not text.startswith('msct') and not text.startswith('default') and 'восстановить' not in text):
windowList.append((hwnd, text, className))
logging.debug(f'enumWindowFunc:{text=}, {className=}')
except Exception:
pass
myWindows = []
Expand Down
2 changes: 1 addition & 1 deletion plugin/show_chrome.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%~d0
cd "%~dp0"

..\python\python.exe ..\plugin\show_chrome.py
..\python\python -c "import pyppeteeradd;pyppeteeradd.hide_chrome(hide=False)"
30 changes: 0 additions & 30 deletions plugin/show_chrome.py

This file was deleted.

0 comments on commit c05705b

Please sign in to comment.