XianYuApis  by cv-cat

E-commerce AI agent base for automated customer service

Created 1 year ago
584 stars

Top 55.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

XianYuApis provides a third-party API integration library for the XianYu platform, addressing the lack of official IM messaging capabilities. It reverses the proprietary WebSocket protocol and encapsulates HTTP interfaces, enabling developers to build 24/7 AI customer service agents. The project solves the critical prerequisite of reliable message sending and receiving, allowing users to focus on AI logic integration.

How It Works

The core approach involves reverse-engineering XianYu's private WebSocket communication protocol, including its custom signature algorithm (sign), base64 encoding, and Protobuf serialization. This enables real-time message exchange. It also encapsulates all available HTTP interfaces with decrypted signature parameters. This provides a unified abstraction layer for message handling, abstracting away protocol complexities.

Quick Start & Requirements

  • Installation: pip install -r requirements.txt.
  • Prerequisites: Python 3.9+ and Node.js 18+ (for signature algorithm).
  • Configuration: Requires a valid user Cookie string from a browser session logged into goofish.com, inserted into goofish_live.py.
  • Execution: Run python goofish_live.py.
  • AI Integration: Modify the handle_message function in goofish_live.py.

Highlighted Details

  • Full encapsulation of XianYu's HTTP interfaces with decrypted signature parameters.
  • Real-time private message sending/receiving via reversed WebSocket protocol.
  • Support for text/image messages, session management, and active sending.
  • Automatic token maintenance for continuous login status.
  • Media upload functionality.

Maintenance & Community

The project is actively maintained with ongoing updates. Community engagement is encouraged via PRs and Issues. A WeChat group is available for users interested in web scraping and AI agents, accessible via author's homepage.

Licensing & Compatibility

The repository's README does not specify a software license, creating ambiguity regarding usage rights and commercial compatibility.

Limitations & Caveats

Usage is strictly prohibited for inappropriate or illegal content. The project relies on user-provided cookies, which can expire, requiring manual updates. As an unofficial integration, it is susceptible to breaking changes from XianYu platform updates. Node.js dependency for signature generation is an external requirement.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
3
Star History
190 stars in the last 30 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Hahnbee Lee Hahnbee Lee(Cofounder of Mintlify), and
2 more.

dittofeed by dittofeed

0.1%
3k
Open-source platform for customer engagement automation
Created 3 years ago
Updated 2 months ago
Feedback? Help us improve.