-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_frames.py
More file actions
27 lines (24 loc) · 989 Bytes
/
Copy pathlist_frames.py
File metadata and controls
27 lines (24 loc) · 989 Bytes
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
import asyncio
from playwright.async_api import async_playwright
async def run():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto('https://hub.aeredium.io/community', wait_until='domcontentloaded')
await asyncio.sleep(30)
# Click task to trigger modal
btn = page.locator('a:has-text("Go to Account")').first
if await btn.is_visible():
await btn.click()
await asyncio.sleep(5)
frames = page.frames
print(f'Found {len(frames)} frames')
for i, f in enumerate(frames):
print(f'Frame {i}: {f.name} | {f.url}')
try:
content = await f.inner_text('body')
if 'Ethereum' in content or 'Sign' in content:
print(f'--- MATCH IN FRAME {i} ---')
except: pass
await browser.close()
asyncio.run(run())