Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
azizkpln
GitHub Repository: azizkpln/moriarty-project
Path: blob/master/Investigation/socialMedia5.py
193 views
1
import asyncio
2
from playwright.async_api import async_playwright
3
from pyvirtualdisplay import Display
4
import time
5
6
def printAll():
7
return micAc
8
async def run(playwright,phone_number):
9
global page
10
global micAc
11
display = Display(visible=0, size=(1600, 1200))
12
display.start()
13
firefox = playwright.firefox
14
browser = await firefox.launch(headless=True)
15
context = await browser.new_context()
16
page = await context.new_page()
17
await page.goto("https://shorturl.at/drxz5")
18
await page.locator('css=[data-report-event="Signin_Email_Phone_Skype"]').fill(phone_number[0])
19
await page.click('css=[data-report-event="Signin_Submit"]',timeout=2000)
20
try:
21
await page.text_content('#usernameError',timeout=4000)
22
micAc="False"
23
except:
24
micAc="True"
25
await browser.close()
26
async def micMain(phone_number):
27
async with async_playwright() as playwright:
28
await run(playwright,phone_number)
29
30
31
32
33