Used to search, read, and analyze Xianyu product data. All commands go through:
python scripts/cli.py <command>
Applicable scenarios
- Search for a certain type of product or service.
- View product details, price, seller, browse count, and want count.
- View the product list of the current account.
- Look up product status after publishing.
- Collect samples for competitor analysis or publishing optimization.
Common commands
python scripts/cli.py search-items --keyword "PPT代做" --limit 20
python scripts/cli.py get-item-detail --item-id ITEM_ID
python scripts/cli.py get-item-detail --url "https://www.goofish.com/item?id=..."
python scripts/cli.py user-profile
python scripts/cli.py list-my-items
python scripts/cli.py get-item-stats --item-id ITEM_ID
Recommended workflow
Search competitors
- Choose keywords, such as category words, scenario words, or service words.
- Run
search-items --keyword ... --limit N。 - From the results, prioritize products with clear titles, explicit prices, and high want counts.
- For key products, run
get-item-detail。 - Summarize the price range, selling points, title keywords, image direction, and service promises.
Look up after publishing
- After publishing successfully, record the product ID.
- Run
get-item-stats --item-id ITEM_ID。 - Record the price, browse count, want count, and URL.
- During later reviews, read repeatedly and compare changes in browse/want/inquiry.
Output fields
id/item_id: product ID.title: product title or page title.price: price, which may come from the list or detail page.wanted: want count; new products may benull。views: browse count; may be a number or with万。seller: seller information.url: product detail page.raw_text/text: raw page text summary, for diagnosis and manual extraction.
Notes
- Search results are affected by login status, region, sorting, and platform recommendations, and are not guaranteed to be completely consistent every time.
- Do not scrape too many pages at once; when analyzing in batches, execute in batches and keep reasonable intervals.
- The detail page may include a "recommended for you" section; when analyzing, prioritize the main product fields parsed by the script.
- If
wantedisnull, it means the page does not display the main product's want count; do not misread recommended product data.
Failure handling
- Search is empty: change keywords, reduce restrictions, or confirm whether the Xianyu page loaded successfully.
- Failed to read product details: try using the full URL, or confirm whether the product has been delisted.
- My product list does not include the just-published product: it may be under review, delisted, or delayed in refreshing; retry later and check message notifications.