Last active
April 9, 2017 09:33
-
-
Save vietdien2005/0f7949ae28ae5f8f22e1739c7877e4e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import pyautogui | |
import time | |
# Uncomment below to take position your cursor | |
# try: | |
# while True: | |
# x, y = pyautogui.position() | |
# positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4) | |
# print(positionStr, end='') | |
# print('\b' * len(positionStr), end='', flush=True) | |
# except KeyboardInterrupt: | |
# print('\n') | |
# print pyautogui.position() | |
count=0 | |
while True: | |
time.sleep(5) | |
#Open Youtube | |
pyautogui.click(x=772, y=476) | |
time.sleep(9) | |
# click like 1 | |
pyautogui.click(x=544, y=652) | |
# click like 2 | |
pyautogui.click(x=544, y=676) | |
# click like 2 | |
pyautogui.click(x=544, y=700) | |
time.sleep(4) | |
# close popup | |
pyautogui.click(x=988, y=43) | |
time.sleep(6) | |
# reload page | |
pyautogui.click(x=778, y=80) | |
count+=1 | |
print ('========================') | |
print (count) | |
print ('========================') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment