Loading...
Loading...
Compare original and translation side by side
account.dianping.com/pclogin.nick-name.username.user-faceaccount.dianping.com/pclogin.nick-name.username.user-faceStep 1: 导航到大众点评首页 (https://www.dianping.com)
Step 2: 使用backbone分析页面结构,检测登录状态(双状态检测)
Step 3:
- 未登录:暂停并引导用户手动完成登录
- 已登录:继续执行查询
Step 4: 动态定位搜索框并输入查询关键词
- 使用search工具动态查找多种选择器:#myInput, #J-search-input, input.j-search-input
- 优先使用placeholder属性进行模糊匹配:input[placeholder*='搜索']
- 避免硬编码ref引用,提高跨页面稳定性
Step 5: 提交搜索并等待结果页面加载
Step 6: 自动处理标签页切换(如产生新标签页)
Step 7: 使用readability提取结构化信息(包含完整分项评分和用户标签)
Step 8: 返回整理后的商户信息Step 1: Navigate to Dianping homepage (https://www.dianping.com)
Step 2: Use backbone to analyze page structure and detect login state (dual-state detection)
Step 3:
- Not logged in: Pause and guide the user to complete login manually
- Logged in: Continue to execute the query
Step 4: Dynamically locate the search box and enter query keywords
- Use the search tool to dynamically find multiple selectors: #myInput, #J-search-input, input.j-search-input
- Prioritize using the placeholder attribute for fuzzy matching: input[placeholder*='搜索']
- Avoid hard-coded ref references to improve cross-page stability
Step 5: Submit the search and wait for the result page to load
Step 6: Automatically handle tab switching (if new tabs are generated)
Step 7: Use readability to extract structured information (including complete sub-item ratings and user tags)
Step 8: Return the organized merchant informationStep 1: 导航到当前城市页面
Step 2: 点击城市选择图标(img.city-select-icon)
Step 3: 在城市列表页面搜索目标城市
Step 4: 点击目标城市链接完成切换
Step 5: 验证城市切换成功(检查URL和当前城市显示)
Step 6: 执行目标城市的查询操作Step 1: Navigate to the current city page
Step 2: Click the city selection icon (img.city-select-icon)
Step 3: Search for the target city on the city list page
Step 4: Click the target city link to complete the switch
Step 5: Verify successful city switching (check URL and current city display)
Step 6: Execute the query operation for the target cityStep 1: 完成基础查询,进入商户详情页面
Step 2: 使用readability提取完整页面内容(自动包含食材评分和用户标签次数)
Step 3: 定位推荐菜区域(#shop-dish)获取菜品列表
Step 4: 提取用户评论信息(评分、评论数量、评论标签及提及次数、详细评论内容)
Step 5: 整理并返回完整的深度信息Step 1: Complete the basic query and enter the merchant details page
Step 2: Use readability to extract complete page content (automatically includes ingredient ratings and user tag counts)
Step 3: Locate the recommended dish area (#shop-dish) to obtain the dish list
Step 4: Extract user review information (ratings, number of reviews, review tags and mention counts, detailed review content)
Step 5: Organize and return complete deep informationStep 1: 执行可能产生新标签页的操作(如搜索提交)
Step 2: 使用list_tabs获取所有打开的标签页
Step 3: 识别最新打开的标签页(通常为搜索结果页)
Step 4: 自动focus到最新标签页
Step 5: 验证标签页URL和标题确保正确性
Step 6: 继续后续操作Step 1: Perform operations that may generate new tabs (such as search submission)
Step 2: Use list_tabs to get all open tabs
Step 3: Identify the newly opened tab (usually the search result page)
Step 4: Automatically focus on the latest tab
Step 5: Verify the tab URL and title to ensure correctness
Step 6: Continue subsequent operationsnavigatebackbonesearchreadabilitylist_tabsnavigatebackbonesearchreadabilitylist_tabstypeclickpressfocus_tabtypeclickpressfocus_tabreadabilitysnapshotreadabilitysnapshot// Step 1: 导航到首页
use_browser(action="navigate", url="https://www.dianping.com")
// Step 2: 检测登录状态
use_browser(action="backbone")
// 检查是否存在用户名元素(已登录状态)
// Step 3: 动态定位搜索框
use_browser(action="search", query="#myInput")
// Step 4: 执行搜索(已登录,直接执行)
use_browser(action="type", ref="found-ref", text="成都小龙坎老火锅", submit=true)
// Step 5: 提取完整结果(包含食材评分4.7、用户标签次数等)
use_browser(action="readability")// Step 1: Navigate to homepage
use_browser(action="navigate", url="https://www.dianping.com")
// Step 2: Detect login state
use_browser(action="backbone")
// Check if the username element exists (logged-in state)
// Step 3: Dynamically locate the search box
use_browser(action="search", query="#myInput")
// Step 4: Execute search (logged in, execute directly)
use_browser(action="type", ref="found-ref", text="成都小龙坎老火锅", submit=true)
// Step 5: Extract complete results (including ingredient rating 4.7, user tag counts, etc.)
use_browser(action="readability")// Step 1: 导航到首页
use_browser(action="navigate", url="https://www.dianping.com")
// Step 2: 检测到未登录状态
use_browser(action="backbone")
// 发现"请登录/注册"文本
// Step 3: 引导用户手动登录
// [暂停操作,提示用户扫码登录]
// Step 4: 用户确认登录后继续
use_browser(action="search", query="#myInput")
use_browser(action="type", ref="found-ref", text="北京中关村 咖啡店", submit=true)// Step 1: Navigate to homepage
use_browser(action="navigate", url="https://www.dianping.com")
// Step 2: Detect not logged-in state
use_browser(action="backbone")
// Found the text "Please Login/Register"
// Step 3: Guide user to login manually
// [Pause operation, prompt user to scan QR code to login]
// Step 4: Continue after user confirms login
use_browser(action="search", query="#myInput")
use_browser(action="type", ref="found-ref", text="北京中关村 咖啡店", submit=true)// Step 1: 导航到当前城市
use_browser(action="navigate", url="https://www.dianping.com")
// Step 2: 点击城市选择图标
use_browser(action="search", query=".city-select-icon")
use_browser(action="click", ref="found-ref")
// Step 3: 搜索目标城市
use_browser(action="search", query="成都")
// Step 4: 点击成都城市链接
use_browser(action="click", ref="found-beijing-ref")
// Step 5: 验证切换成功后执行查询
use_browser(action="search", query="#myInput")
use_browser(action="type", ref="found-ref", text="小龙坎火锅", submit=true)// Step 1: Navigate to current city
use_browser(action="navigate", url="https://www.dianping.com")
// Step 2: Click city selection icon
use_browser(action="search", query=".city-select-icon")
use_browser(action="click", ref="found-ref")
// Step 3: Search for target city
use_browser(action="search", query="成都")
// Step 4: Click Chengdu city link
use_browser(action="click", ref="found-beijing-ref")
// Step 5: Execute query after verifying successful switch
use_browser(action="search", query="#myInput")
use_browser(action="type", ref="found-ref", text="小龙坎火锅", submit=true)// Step 1: 进入商户详情页面后
use_browser(action="readability") // 提取完整页面内容
// 结果将包含:
// - 综合评分: 4.4分
// - 分项评分: 口味4.4, 环境4.4, 服务4.4, 食材4.7
// - 用户标签: ["排队情况(2269次)", "收银员态度好(647次)", "环境干净整洁(646次)", ...]
// - 推荐菜: ["鸳鸯锅", "玫瑰圆子", "牛奶鸭血", ...]
// - 营业时间: 11:00-次日02:00// Step 1: After entering the merchant details page
use_browser(action="readability") // Extract complete page content
// Results will include:
// - Overall Rating: 4.4 points
// - Sub-item Ratings: Taste 4.4, Environment 4.4, Service 4.4, Ingredients 4.7
// - User Tags: ["Queue situation(2269 times)", "Cashier attitude good(647 times)", "Environment clean and tidy(646 times)", ...]
// - Recommended Dishes: ["Mandarin Duck Pot", "Rose Meatball", "Milk Duck Blood", ...]
// - Business Hours: 11:00-02:00 next day// 使用search工具动态定位搜索框,避免硬编码
use_browser(action="search", query="#myInput")
// 或在搜索结果页
use_browser(action="search", query="#J-search-input")
// 根据返回的ref进行操作
use_browser(action="type", ref="found-ref", text="查询关键词", submit=true)// Use search tool to dynamically locate search box, avoid hard coding
use_browser(action="search", query="#myInput")
// Or on search result page
use_browser(action="search", query="#J-search-input")
// Perform operations based on returned ref
use_browser(action="type", ref="found-ref", text="Query Keyword", submit=true)// 统一的搜索框定位策略,兼容不同页面
use_browser(action="search", query="input[placeholder*='搜索'],#myInput,#J-search-input,input.j-search-input")
// 选择第一个找到的搜索框
use_browser(action="type", ref="first-found-ref", text="西安回民街", submit=true)// Unified search box positioning strategy, compatible with different pages
use_browser(action="search", query="input[placeholder*='搜索'],#myInput,#J-search-input,input.j-search-input")
// Select the first found search box
use_browser(action="type", ref="first-found-ref", text="西安回民街", submit=true)// 执行搜索后自动处理标签页
use_browser(action="type", ref="search-input-ref", text="回民街", submit=true)
// 获取所有标签页
use_browser(action="list_tabs")
// 自动切换到最新标签页(搜索结果页)
use_browser(action="focus_tab", targetId="latest-search-tab-id")
// 继续后续操作
use_browser(action="readability")// Automatically handle tabs after executing search
use_browser(action="type", ref="search-input-ref", text="回民街", submit=true)
// Get all tabs
use_browser(action="list_tabs")
// Automatically switch to the latest tab (search result page)
use_browser(action="focus_tab", targetId="latest-search-tab-id")
// Continue subsequent operations
use_browser(action="readability")// 查询热门商圈(如回民街、南京路等)
use_browser(action="search", query="input[placeholder*='搜索']")
use_browser(action="type", ref="found-ref", text="西安回民街", submit=true)
// 提取商圈整体信息
use_browser(action="readability")
// 结果包含商圈评分、总评价数、热门标签、地理位置等信息// Query popular business districts (such as Muslim Quarter, Nanjing Road, etc.)
use_browser(action="search", query="input[placeholder*='搜索']")
use_browser(action="type", ref="found-ref", text="西安回民街", submit=true)
// Extract overall business district information
use_browser(action="readability")
// Results include business district rating, total number of reviews, popular tags, geographic location, etc.readabilitysnapshotsearchreadabilitysnapshotsearchreferences/browser-actions.mdreferences/dianping-selectors.mdreferences/tab-management.mdreferences/city-switching.mdreferences/deep-info-extraction.mdreferences/browser-actions.mdreferences/dianping-selectors.mdreferences/tab-management.mdreferences/city-switching.mdreferences/deep-info-extraction.mdreferences/query-workflow.mdreferences/login-handling.mdreferences/query-workflow.mdreferences/login-handling.md