kitUIN / PicImageSearch

整合图片识别 API,用于以图搜源 / Aggregator for Reverse Image Search API
https://pic-image-search.kituin.fun/
MIT License
428 stars 46 forks source link

Ascii2d need selected.websource #86

Closed LittleApple-fp16 closed 10 months ago

LittleApple-fp16 commented 10 months ago

I would like to have a built-in string to display what social media site the item comes from. Example: selected.websource should display 'Twitter' or 'pixiv'

NekoAria commented 10 months ago

The previous version included an attribute named mark, which is the gray source website marker you can see on ascii2d. However, I felt that this was not very effective. It's better to directly parse the domain of the returned selected.url to identify the source website. This is because the number of websites that can be identified through mark is limited, and some are in Japanese. Specifically, in most cases, these are the ones included in SUPPORTED_SOURCES :

SUPPORTED_SOURCES = ["pixiv", "twitter", "fanbox", "fantia", "ニコニコ静画", "ニジエ"]
LittleApple-fp16 commented 10 months ago

Okay, I understand what you mean.