nostrenz / hatate-iqdb-tagger

Search and tag images using IQDB or SauceNAO to be imported into Hydrus.
78 stars 2 forks source link

Adding saucenao tags for deleted pixiv images #16

Open tcmbackwards opened 2 years ago

tcmbackwards commented 2 years ago

Even when an image is gone from pixiv, saucenao often has useful information in its results.

Here's a result from saucenao (this example image does exist on pixiv but the result info on saucenao is the same):

<div class="resultmatchinfo">
    <div class="resultsimilarityinfo">94.19%
    </div>
    <div class="resultmiscinfo">
    </div>
</div>
<div class="resultcontent">
    <div class="resulttitle">
        <strong>無題</strong>       <-- title tag
        <br>
    </div>
    <div class="resultcontentcolumn">
        <strong>Pixiv ID: </strong>
        <a href="https://www.pixiv.net/member_illust.php?mode=medium&amp;illust_id=95277212" <-- illust_id is the "pixiv work" tag in Hydrus
            class="linkify">95277212</a>
        <span style="padding-left:10px;">
            <a href="https://saucenao.com/info.php?lookup_type=0&amp;db=5&amp;id=95277212">
                <img src="/images/static/saucenao_info.png" width="10px" height="10px"></a>
        </span>
        <br>
        <strong>Member:</strong>
        <a href="https://www.pixiv.net/member.php?id=76820897" class="linkify">胖貓says hi</a> <-- id is the "pixiv id" tag in Hydrus, the user's immutable pixiv id, and the inner text is the creator tag
        <span style="padding-left:10px;">
            <a href="https://saucenao.com/info.php?lookup_type=1&amp;db=5&amp;id=76820897">
                <img src="/images/static/saucenao_info.png" width="10px" height="10px"></a>
        </span>
        <br>
        <br>
    </div>
</div>

So even if the image is deleted we could still get these tags for Hydrus:

title:無題 creator:胖貓says hi pixiv id:76820897 pixiv work:95277212

The immutable pixiv id is useful because pixiv users have had a tendency to change names for events such as cons.

As far as I can tell, Hatate doesn't do anything with these results to make tags out of them if the image was deleted from pixiv. Can we get these tags?

nostrenz commented 2 years ago

Hi,

Those tags could definitely be useful, I'll see what I can do with them for the next release.

tcmbackwards commented 2 years ago

Thanks. Saucenao also sometimes has similar information from DA and Nijie.

nostrenz commented 2 years ago

With the last release some tags will now be retrieved from SauceNAO results. I'm already thinking about obtaining more tags for the next release, but I think it's a good start.