Created
March 28, 2023 01:01
-
-
Save SomethingGeneric/46ceabd67883f4fc672997ddbc3dbc2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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