-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-parser.py
31 lines (27 loc) · 1.11 KB
/
test-parser.py
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
#Visual Studio
#Py
#Установить модули Selenium, reguests, time
from tools.mailru import mailru_mail
# импорт модулей
from selenium import webdriver #модуль Selenium драйвера
from selenium.webdriver.chrome.service import Service #модуль Selenium драйвера
from webdriver_manager.chrome import ChromeDriverManager
import requests
import time
profile_id = '52871804' #профиль в Dolphin-Anty
reg_url = f'http://localhost:3001/v1.0/browser_profiles/{profile_id}/start?automation=1'
response = requests.get(reg_url)
print(response)
respons_json = response.json()
print(respons_json)
port = str(respons_json['automation']['port'])
print(port)
# #инициализируем вебдрайвер Долфин Анти
chrome_drive_path = Service(executable_path='./chromedriver-linux-x64')
options = webdriver.ChromeOptions()
options.debugger_address = '127.0.0.1:'+port
driver = webdriver.Chrome(service=chrome_drive_path,chrome_options=options)
# driver.get("https://instagram.com")
m = mailru_mail(driver)
m.mail_check()
driver.quit()