• hitstun@fedia.ioOP
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Sure thing!

    1. User pastes an image URL into cell B2
    2. Google Sheets loads the page for a SauceNAO.com search limited to Pixiv, parsing it as XML
    3. From the SauceNAO results, it reads the title, page URL, artist name, and artist URL from that XML
    4. Google Translate tries to translate the title and artist name into the user’s language if it’s not already
    5. Google Sheets also tries to load the Pixiv image page and scrape the canonical URL from its XML
    6. Using all this scraped information, it stitches them together into post titles and source comments you can copy and paste
    7. It also does a SauceNAO search for non-Pixiv source and gives their URLs if any are available
    • Martineski@lemmy.fmhy.mlM
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

      OMG! It works with links that are not directly to pixiv! Thank you so muuuuch! It will make it so much easier for me to find and add links to the original posts with images because so far I was uploading images with only creator and image id’s. You showed up right when I wanted to start (in ~2 days) adding links to the images in my posts.

      Edit: but how would the tool work when multiple people are trying to use it?

      • hitstun@fedia.ioOP
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Well, users would fight over the URL entry field and have to copy the results they need before the URL changes again. Also, SauceNAO and the IMPORTXML commands will both start limiting us and giving errors if we make several requests within a few minutes.

        • Martineski@lemmy.fmhy.mlM
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 year ago

          requests within a few minutes.

          Dammit, if you check my sublemmies then you will notice that I have a lot of images where I have to change the title of the post need to include direct links to the artwork and artist’s socials.

          • hitstun@fedia.ioOP
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            You can mitigate this a little bit by making your own private copy of the Google Sheet. That way, nobody else can enter stuff into the sheet and mess with you. But, your copy won’t get updated if I add DeviantArt support.