On-demand Scout service (replaces the nightly aggregator): - FastAPI agent-mesh service; card name "matchmaking-service" (HTTP /a2a/tasks + Redis-stream worker matching the sibling-service pattern) - run_search: parallel multi-board sweep (Naukri/blackfalcondata + Foundit + LinkedIn), city-filtered at the board, cheapest-per-result first - per-board adapters + normalizers -> ScoutJob with rich read-only details and offsite apply links; recall mode + MVQ guard - result cache for dev replay ($0); per-board cost knobs; retry-on-5xx - research/: engine design, board cost economics, India-actor shortlist, POC
21 lines
1.1 KiB
Python
21 lines
1.1 KiB
Python
import asyncio
|
|
from browser_use import BrowserSession
|
|
from browser_config import make_profile
|
|
async def ev(s,e):
|
|
c=await s.get_or_create_cdp_session()
|
|
r=await c.cdp_client.send.Runtime.evaluate(params={"expression":e,"returnByValue":True},session_id=c.session_id)
|
|
return r.get("result",{}).get("value")
|
|
async def click(s,t):
|
|
return await ev(s,f"""(()=>{{const el=[...document.querySelectorAll('button,[role=tab]')].find(e=>(e.textContent||'').trim().toLowerCase().includes('{t.lower()}'));if(el){{el.click();return true}}return false}})()""")
|
|
async def main():
|
|
s=BrowserSession(browser_profile=make_profile(headless=True,persist=False)); await s.start()
|
|
try: await s._cdp_set_viewport(width=1340,height=1080)
|
|
except: pass
|
|
await ev(s,"try{localStorage.removeItem('scout-onboarded')}catch(e){}")
|
|
await s.navigate_to("http://localhost:3001/scout"); await asyncio.sleep(4)
|
|
await click(s,"Configure"); await asyncio.sleep(1)
|
|
await click(s,"Find my matches"); await asyncio.sleep(8)
|
|
await s.take_screenshot(path="/tmp/action_deck.png",full_page=True); print("deck")
|
|
await s.kill()
|
|
asyncio.run(main())
|