Loading...
Loading...
Professional Dianping website information query skill, supporting functions such as merchant search, detail acquisition, rating information extraction, city switching and deep information query. It is used when users need to query merchant information, obtain store details, view ratings and reviews, switch cities and other data from the Dianping website. This skill includes a complete dual-state login detection mechanism (logged in/not logged in), user guidance mechanism and standardized operation process, and supports the extraction of complete sub-item ratings including ingredient ratings. Newly added functions include cross-page search box dynamic positioning, automatic multi-tab management, business district query support and standardized user tag processing.
npx skill4agent add stvlynn/dingtalk-wukong-skills dianping-info-queryaccount.dianping.com/pclogin.nick-name.username.user-faceStep 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: 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: 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: 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_tabstypeclickpressfocus_tabreadabilitysnapshot// 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: 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: 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: 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// 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)// 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)// 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")// 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.readabilitysnapshotsearchreferences/browser-actions.mdreferences/dianping-selectors.mdreferences/tab-management.mdreferences/city-switching.mdreferences/deep-info-extraction.mdreferences/query-workflow.mdreferences/login-handling.md