Skip to main content

A Python library providing an asynchronous API interface for pcolle.com / gcolle.net

Project description

xcolle-api

PyPI - Version Python Version License linting - Ruff

A Python library providing an asynchronous API interface for pcolle.com / gcolle.net.

Installation

You can install using uv:

uv tool install xcolle_api

Data Model

The objects returned by the API are dataclasses, with 2 convenience methods:

  • as_dict: Same as dataclasses.asdict
  • as_json: Returns a JSON string representation of the object

Quick Start

Basic example on how to use it:

import asyncio
from pathlib import Path

from xcolle_api import PcolleAPI


async def fetch_product(product_id: str) ->  None:
    async with PcolleAPI() as api:
        product = await api.product(product_id)

    print(product.as_dict())
    Path(f"product_{product_id}.json").write_text(product.as_json())


if __name__ == "__main__":
    asyncio.run(fetch_product("197240637f2aa245ecf"))

Output

{
  "id": "197240637f2aa245ecf",
  "file_name": "p902.mp4",
  "file_size": "238.11 MB",
  "file_size_bytes": 249676431,
  "ratings": 3,
  "views": 7208,
  "price": 920,
  "title": "あの同僚さんがついにパンティまでも・・・固定カメラ版",
  "sales_start_date": "2022-11-24 00:00:00+00:00",
  "seller_id": "5975951e350bdd97",
  "thumbnail": "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/132828_300x225.jpg",
  "url": "https://www.pcolle.com/product/detail/?product_id=197240637f2aa245ecf",
  "category": {
    "id": 5,
    "name": "店員・OL・働く女性"
  },
  "contains": [],
  "set": "197243637f2c0257993",
  "additional_info": [
    "セット商品として購入できます"
  ],
  "description": "商品説...",
  "description_html": "<p class=\"title-item title-05\">商品説明</p>...",
  "previews": [
    "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/132828_1.jpg",
    "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/132828_2.jpg",
    "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/132828_3.jpg",
    "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/132828_4.jpg",
    "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/132828_5.jpg",
    "https://img.pcolle.com/5975951e350bdd97/197240637f2aa245ecf/174045_ab6.jpg"
  ],
  "tags": [
    {
      "id": 125,
      "name": "パンチラ"
    },
    {
      "id": 18,
      "name": "胸チラ"
    },
    {
      "id": 32,
      "name": "OL"
    },
    {
      "id": 47,
      "name": "アイドル風"
    },
    {
      "id": 74,
      "name": "生足"
    },
    {
      "id": 75,
      "name": "スカートめくり"
    },
    {
      "id": 86,
      "name": "カメラ目線"
    },
    {
      "id": 99,
      "name": "美尻"
    },
    {
      "id": 109,
      "name": "開脚"
    }
  ],
  "manage_id": "5975951e350bdd97",
  "bonus": null
}

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

xcolle_api-0.1.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xcolle_api-0.1.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file xcolle_api-0.1.1.tar.gz.

File metadata

  • Download URL: xcolle_api-0.1.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for xcolle_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8d04323eba2e5fbe5b15ec699b7088d3b90ae536e169ab37a90f68c2c11cc8c0
MD5 fac0916cdced32f280a4de2470d27af2
BLAKE2b-256 b8c9ed0a946d5f044575b337af1315bd6600c412a3fa7ed0623c5433523b9f4f

See more details on using hashes here.

File details

Details for the file xcolle_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: xcolle_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for xcolle_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69ddd31fefd51e2862adaca5b66531ef89c1ab0b0e97cbda4653867ada09458c
MD5 17d27369f5fc1c1a78d0119831dd63d1
BLAKE2b-256 2c96f2b384e1fb2132c857500caa68cf485f4f69b5f586b7f8d9ab91a715333a

See more details on using hashes here.

Supported by

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