Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyautogui
- import time
- from PIL import Image
- import numpy as np
- #input_string = input('metti email ')
- #emails = input_string.split()
- #input_string2 = input('metti pass ')
- #passwords = input_string2.split()
- passwords = 'Simisimi86', ' '
- emails = 'simopop7@gmail.com', ' '
- c = 0
- for email in emails:
- time.sleep(1)
- pyautogui.click(150, 55, clicks=2, button='left', interval=0.25)
- #walmart.com
- time.sleep(0.2)
- pyautogui.typewrite('walmart.com')
- pyautogui.press('enter')
- #entra nel sito
- #screenshot per vedere se si conette
- image = pyautogui.screenshot()
- image1 = image.crop((272, 71, 649, 114))
- image2 = Image.open('test.png')
- buffer1 = np.asarray(image1)
- buffer2 = np.asarray(image2)
- buffer3 = buffer1 - buffer2
- if np.count_nonzero(buffer3) == 0:
- break
- time.sleep(1)
- #funzione tab
- def tabs(ripetizioni):
- for numbers in (range(0, ripetizioni)):
- pyautogui.press('tab')
- time.sleep(0.6)
- tabs(8)
- image = pyautogui.screenshot()
- image1 = image.crop((1461, 70, 1504, 115))
- image2 = Image.open('test2.png')
- buffer1 = np.asarray(image1)
- buffer2 = np.asarray(image2)
- buffer3 = buffer1 - buffer2
- if np.count_nonzero(buffer3) == 0:
- pyautogui.press('enter')
- else:
- tabs(1)
- pyautogui.press('enter')
- time.sleep(3)
- tabs(1)
- pyautogui.press('enter')
- #sign in
- time.sleep(1.3)
- tabs(2)
- pyautogui.typewrite(email, interval=0.25)
- pyautogui.press('tab')
- pyautogui.typewrite(passwords[c], interval=0.25)
- c = c + 1
- tabs(5)
- pyautogui.press('enter')
- #check login
- image = pyautogui.screenshot()
- image1 = image.crop((776, 118, 1121, 245))
- image2 = Image.open('login.png')
- buffer1 = np.asarray(image1)
- buffer2 = np.asarray(image2)
- buffer3 = buffer1 - buffer2
- if np.count_nonzero(buffer3) == 0:
- print('login non riuscito')
- exit()
- pyautogui.click(684, 93)
- tabs(3)
- pyautogui.press('enter')
- tabs(3)
- pyautogui.press('enter')
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement