loading
""" def log(m): print(m, flush=True) async def main(): async with async_playwright() as p: browser = await p.chromium.launch(headless=False, channel="chrome", args=['--no-sandbox']) ctx = await browser.new_context(viewport={'width': 1920, 'height': 1080}) page = await ctx.new_page() await page.goto("https://website.lifisher.com/cloud-station/login", wait_until="domcontentloaded", timeout=30000) await page.wait_for_timeout(3000) if 'login' in page.url: await page.fill('input[placeholder*="手机"], input[type="tel"]', USERNAME) await page.fill('input[type="password"]', PASSWORD) await page.click('button:has-text("登录"), button:has-text("登 录"), .login-btn') await page.wait_for_timeout(6000) await page.goto("https://website.lifisher.com/cloud-station/set/stats-code", wait_until="domcontentloaded", timeout=30000) await page.wait_for_timeout(8000) # 点击第 7 个编辑按钮(索引6, 即 Schema 条目) ok = await page.evaluate(""" () => { const btns = [...document.querySelectorAll('button, a, span')] .filter(e => e.offsetParent !== null && (e.textContent || '').trim() === '编辑'); if (btns.length > 6) { btns[6].click(); return btns.length; } return btns.length; } """) log(f"编辑按钮总数: {ok}, 已点击 #6") await page.wait_for_timeout(3500) # 验证是 Schema 条目 cur = await page.evaluate("""() => [...document.querySelectorAll('textarea')].filter(t=>t.offsetParent!==null).map(t=>t.value||'').join('\\n')""") if 'Schema Enhancement' not in cur: log("!! 错误: 当前条目不是 Schema 脚本, 中止") await page.screenshot(path=str(OUT / "v3_wrong_entry.png"), full_page=True) await browser.close() return log("确认是 Schema 条目, 写入 v3...") # 写入新内容: native setter + input 事件 (Vue 感知) await page.evaluate(""" (newCode) => { const ta = [...document.querySelectorAll('textarea')].find(t => t.offsetParent !== null); const setter = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, 'value').set; setter.call(ta, newCode); ta.dispatchEvent(new Event('input', {bubbles: true})); ta.dispatchEvent(new Event('change', {bubbles: true})); } """, NEW_SCRIPT) await page.wait_for_timeout(1000) # 验证写入 check = await page.evaluate("""() => [...document.querySelectorAll('textarea')].filter(t=>t.offsetParent!==null).map(t=>t.value||'').join('')""") log(f"写入后长度: {len(check)}, 含v3: {'v3' in check}") await page.screenshot(path=str(OUT / "v3_before_save.png"), full_page=True) # 点击「保存并发布」(优先), 否则「保存」 saved = await page.evaluate(""" () => { const btns = [...document.querySelectorAll('button')].filter(e => e.offsetParent !== null); for (const label of ['保存并发布', '保存并返回', '保 存', '保存']) { const b = btns.find(e => (e.textContent || '').trim().replace(/\\s+/g, '') === label.replace(/\\s+/g, '')); if (b) { b.click(); return label; } } return null; } """) log(f"点击按钮: {saved}") await page.wait_for_timeout(4000) await page.screenshot(path=str(OUT / "v3_after_save.png"), full_page=True) # 检查成功提示 msg = await page.evaluate("""() => { const m = document.querySelector('.el-message'); return m ? m.textContent : ''; }

Commercial waterproof festoon lights for contractors, venues and distributors. Custom E27/B22, 24V/230V and OEM/ODM outdoor string light systems for UK, EU and Australia projects.

Waterproof LED Bulbs
Waterproof E27/B22 LED bulbs for outdoor festoon lights, including G45, G50, S14 and filament styles for commercial installations.
Send your inquiry
Hot sales 2200k 2500k 2700k 3000k G45 plastic global 230v 24v e27 led bulb warm white waterproof outdoor 24v led bulbs
Driven by business needs, we have been constantly optimizing and upgrading our technologies including. These technologies contribute to our high-efficiency manufacturing process.In the application field(s) of LED Bulbs.the Hot sales 2200k 2500k 2700k 3000k G45 plastic global 230v 24v e27 led bulb warm white waterproof outdoor 24v led bulbs proves to be very useful.
Contact us
whatsapp
Contact customer service
Contact us
whatsapp
cancel
Customer service
detect