Skip to content

Instantly share code, notes, and snippets.

@vietdien2005
Last active April 9, 2017 09:33
Show Gist options
  • Save vietdien2005/0f7949ae28ae5f8f22e1739c7877e4e5 to your computer and use it in GitHub Desktop.
Save vietdien2005/0f7949ae28ae5f8f22e1739c7877e4e5 to your computer and use it in GitHub Desktop.
#! /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