Path: blob/master/Investigation/socialMedia5.py
193 views
import asyncio1from playwright.async_api import async_playwright2from pyvirtualdisplay import Display3import time45def printAll():6return micAc7async def run(playwright,phone_number):8global page9global micAc10display = Display(visible=0, size=(1600, 1200))11display.start()12firefox = playwright.firefox13browser = await firefox.launch(headless=True)14context = await browser.new_context()15page = await context.new_page()16await page.goto("https://shorturl.at/drxz5")17await page.locator('css=[data-report-event="Signin_Email_Phone_Skype"]').fill(phone_number[0])18await page.click('css=[data-report-event="Signin_Submit"]',timeout=2000)19try:20await page.text_content('#usernameError',timeout=4000)21micAc="False"22except:23micAc="True"24await browser.close()25async def micMain(phone_number):26async with async_playwright() as playwright:27await run(playwright,phone_number)282930313233