-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocurarINPI.py
More file actions
37 lines (35 loc) · 1.1 KB
/
procurarINPI.py
File metadata and controls
37 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import pyautogui as py
import pyperclip as clip
from time import *
def procurarINPI():
marcas = input("Digite os nomes das empresas separados por vírgula: ").split(',')
for i, marca in enumerate(marcas):
py.hotkey("ctrl", "t")
sleep(1.5)
clip.copy("https://busca.inpi.gov.br/pePI/servlet/LoginController?action=login")
py.hotkey("ctrl", "v")
sleep(1.5)
py.press("enter")
sleep(1.5)
py.press("TAB", presses=12)
py.press("enter")
sleep(1.5)
py.press("TAB", presses=13)
py.press("enter")
sleep(1.5)
clip.copy(marca.strip())
py.hotkey("ctrl", "v")
sleep(1.5)
py.press("TAB", presses=3)
sleep(2)
py.press('up', presses=4)
sleep(1.5)
py.press("TAB", presses=1)
py.press("enter")
sleep(2)
if i < len(marcas) - 1: # Se não for a última empresa
py.hotkey('ctrl', 'pgdn') # Muda para a próxima guia
# Volta para a primeira guia
for _ in range(len(marcas) - 1):
py.hotkey('ctrl', 'pgup')
procurarINPI()