Skip to main content

PicImageSearch APIs for Python 3.x 适用于 Python 3 以图搜源整合API

Project description

PicImageSearch

✨ 聚合识图引擎 用于以图搜源✨

license pypi python release release

📖文档 · 🐛提交建议

支持

简要说明

详细见文档 或者demo
同步请使用from PicImageSearch.sync import ...导入
异步请使用from PicImageSearch import Network,...导入
推荐使用异步

简单示例

from loguru import logger
from PicImageSearch import SauceNAO, Network

async with Network() as client:  # 可以设置代理 Network(proxies='scheme://host:port')
    saucenao = SauceNAO(client=client, api_key="your api key")  # client, api_key 不能少
    url = "https://raw.githubusercontent.com/kitUIN/PicImageSearch/main/demo/images/test01.jpg"
    resp = await saucenao.search(url=url)
    # 搜索本地图片
    # file = "demo/images/test01.jpg"
    # resp = await saucenao.search(file=file)

    logger.info(resp.status_code)  # HTTP 状态码
    # logger.info(resp.origin)  # 原始数据
    logger.info(resp.raw[0].origin)
    logger.info(resp.long_remaining)
    logger.info(resp.short_remaining)
    logger.info(resp.raw[0].thumbnail)
    logger.info(resp.raw[0].similarity)
    logger.info(resp.raw[0].hidden)
    logger.info(resp.raw[0].title)
    logger.info(resp.raw[0].author)
    logger.info(resp.raw[0].url)
    logger.info(resp.raw[0].pixiv_id)
    logger.info(resp.raw[0].member_id)
from PicImageSearch.sync import SauceNAO

saucenao = SauceNAO(api_key="your api key")  # api_key 不能少
url = "https://raw.githubusercontent.com/kitUIN/PicImageSearch/main/demo/images/test01.jpg"
resp = saucenao.search(url=url)
# 搜索本地图片
# file = "demo/images/test01.jpg"
# resp = saucenao.search(file=file)
# 下面操作与异步方法一致

安装

  • 此包需要 Python 3.7 或更新版本。
  • pip install PicImageSearch
  • 或者
  • pip install PicImageSearch -i https://pypi.tuna.tsinghua.edu.cn/simple

Star History

Star History

Project details


Release history Release notifications | RSS feed

This version

3.7.2

Download files

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

Source Distribution

PicImageSearch-3.7.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

picimagesearch-3.7.2-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file PicImageSearch-3.7.2.tar.gz.

File metadata

  • Download URL: PicImageSearch-3.7.2.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for PicImageSearch-3.7.2.tar.gz
Algorithm Hash digest
SHA256 81db5d49fdefd04fd434de1f9c79bf3ae903bc042783d9e038efc7cb0087f3ce
MD5 3522ba8b5fcbb4de18de810543c0beeb
BLAKE2b-256 a44cb864049e44c5a22b7425b73e2ead484977c0a9a9036da8e218416f85888d

See more details on using hashes here.

File details

Details for the file picimagesearch-3.7.2-py3-none-any.whl.

File metadata

  • Download URL: picimagesearch-3.7.2-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for picimagesearch-3.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce4413b7557d4704f192273cc18043647aeb89272bec569912878d8dd75856f4
MD5 03f02941f9315b7612a5887619a00bef
BLAKE2b-256 d4279437e716188b19b727cde29deaeb842c76f437f5dda1d08985621938f727

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