Skip to content

Instantly share code, notes, and snippets.

@SomethingGeneric
Created March 28, 2023 01:01
Show Gist options
  • Save SomethingGeneric/46ceabd67883f4fc672997ddbc3dbc2f to your computer and use it in GitHub Desktop.
Save SomethingGeneric/46ceabd67883f4fc672997ddbc3dbc2f to your computer and use it in GitHub Desktop.
import asyncio
from playwright.async_api import async_playwright
import getpass
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=False)
page = await browser.new_page()
# Login to the website
await page.goto('https://winni.wiki/index.php?title=Special:UserLogin&returnto=Special%3ANukeDPL')
await page.fill('#wpName1', 'matt')
await page.fill('#wpPassword1', getpass.getpass())
await page.click('#wpLoginAttempt')
while True:
# Navigate to the desired URL and interact with the elements
await page.goto('https://winni.wiki/index.php/Special:NukeDPL')
await page.fill('textarea[name="query"]', 'notmodifiedby = matt')
await page.click('input[type="submit"]')
await asyncio.sleep(0.5)
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment