Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #357 #347 #370

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions wechat_jump_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,10 @@ def _get_screen_size():


def pull_screenshot():
process = subprocess.Popen('adb shell screencap -p', shell=True, stdout=subprocess.PIPE)
screenshot = process.stdout.read()
if sys.platform == 'win32':
screenshot = screenshot.replace(b'\r\n', b'\n')
f = open('autojump.png', 'wb')
f.write(screenshot)
f.close()
# 直接使用 adb pull, 解决issue #357
os.system('adb shell screencap -p /sdcard/autojump.png')
os.system('adb pull /sdcard/autojump.png .')


def backup_screenshot(ts):
# 为了方便失败的时候 debug
Expand Down