Skip to main content

An unofficial API wrapper for Buff163, a CS skin marketplace.

Project description

Buff163 Unofficial API Wrapper

An unofficial Python API wrapper for Buff163, a CS skin marketplace.

Installation

Install the package with npm

pip install buff163-unofficial-api

Usage/Examples

Example of using the API to get frontpage items.

from buff163_unofficial_api import Buff163API

# Example cookie format
cookie = "Device-Id=_; Locale-Supported=_; game=_; NTES_YD_SESS=_; S_INFO=_; P_INFO=_; remember_me=_; session=_; csrf_token=_"

buff163api = Buff163API(session_cookie=cookie)

market = buff163api.get_featured_market()

for item in market:
    print(f"{item.market_hash_name}")
    print(f{item.sell_min_price}\n")

How To Get Your Cookie

  1. Be logged into https://buff.163.com & open the site.

  2. Open inspect element.

    F12 on Windows | Command + SHIFT + C on Mac.

  3. Click on the "Network" tab at the top.

  4. Refresh the page.

  5. Filter with "api".

  6. Click on any of the results (Ex: popular_sell_order?=#).

  7. On the right scroll down to the "Request Headers" section.

  8. Copy the large "Cookie:" parameter under the request headers.

  9. Set this as the session cookie (Ex: Buff163API(session_cookie="your_cookie")).

Documentation

For detailed documentation, please refer to:

Read the Docs

Function Overviews

Contributing

Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better or see a missing route, please fork the repo and create a pull request. You can also simply open an issue with the tag "contribution". Thanks for taking the time to improve this API wrapper!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.md for more information.

Contact

Mark Zhdan - markzhdan@gmail.com

Project Link: https://github.com/markzhdan/buff163-unofficial-api

PyPI Link: https://pypi.org/project/buff163-unofficial-api

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buff163-unofficial-api-0.1.3.tar.gz (11.6 kB view details)

Uploaded Source

File details

Details for the file buff163-unofficial-api-0.1.3.tar.gz.

File metadata

File hashes

Hashes for buff163-unofficial-api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f3535264a24357bd7a6f3a89494077f793d3c419dc87e7be9d740c93e8fcf57e
MD5 a780c3ab2a36b11d16807cc452439133
BLAKE2b-256 d1be3a84eccdbb9ad503da86d1c7f7877467e8b1091f720b111bf641ac702ed8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page