"use strict";(()=>{var e={};e.id=8499,e.ids=[8499],e.modules={20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},56681:e=>{e.exports=require("playwright")},80841:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>y,patchFetch:()=>h,requestAsyncStorage:()=>p,routeModule:()=>c,serverHooks:()=>m,staticGenerationAsyncStorage:()=>d});var a={};r.r(a),r.d(a,{POST:()=>u});var o=r(49303),i=r(88716),n=r(60670),s=r(87070),l=r(56681);async function u(e){try{let{country:t,city:r,userType:a,pageLimit:o=1}=await e.json(),i=`https://www.mlmdiary.com/directory?country=${t}&usertype=${a}&city=${r}&page=${o}`;if(!i)return s.NextResponse.json({error:"URL is required"},{status:400});let n=(await l.chromium.connectOverCDP("http://localhost:9222")).contexts()[0].pages()[0];await n.goto(i,{waitUntil:"domcontentloaded",timeout:12e4}),await n.waitForTimeout(1500);let u=await n.evaluate(()=>{let e=document.querySelectorAll(".database_listing div.database"),t=[];return e.length&&e.forEach(e=>{let r=e.querySelector("div.database_profile img")?.src||"",a=e.querySelector("div.database_cont h5")?.innerText||"",o=e.querySelector("div.database_cont ul li.location")?.innerText||"",i=e.querySelector("div.database_cont ul li.company")?.innerText||"",n=e.querySelector("div.database_cont ul li.plan")?.innerText||"",s=e.querySelector("div.database_cont a.profile_btn")?.href||"";t.push({img:r,title:a,location:o,company:i,plan:n,url:s})}),t});return s.NextResponse.json(u)}catch(e){return console.log(e),[]}}let c=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/mlm_diary_scraper/route",pathname:"/api/mlm_diary_scraper",filename:"route",bundlePath:"app/api/mlm_diary_scraper/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\mlm_diary_scraper\\route.js",nextConfigOutput:"",userland:a}),{requestAsyncStorage:p,staticGenerationAsyncStorage:d,serverHooks:m}=c,y="/api/mlm_diary_scraper/route";function h(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:d})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,5972],()=>r(80841));module.exports=a})();