Giter Club home page Giter Club logo

picimagesearch's Introduction

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

picimagesearch's People

Contributors

nekoaria avatar kituin avatar lleans avatar chinoll avatar renovate[bot] avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.