Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve links or HTML in Furaffinity descriptions? #1231

Closed
cinnamon-bun opened this issue Jan 7, 2021 · 3 comments
Closed

Preserve links or HTML in Furaffinity descriptions? #1231

cinnamon-bun opened this issue Jan 7, 2021 · 3 comments

Comments

@cinnamon-bun
Copy link

The description sometimes contains important links like:

  • links to other accounts who might be the actual author of the content, if it was a commission
  • Next | First | Prev links for comics and image sequences

The description's HTML is removed and that info is lost:

https://github.com/mikf/gallery-dl/blob/master/gallery_dl/extractor/furaffinity.py#L83-L113

            # new site layout
            data["description"] = text.unescape(rh(extr(
                'class="section-body">', '</div>'), "", ""))

            # new site layout
            data["description"] = text.unescape(text.remove_html(extr(
                "</table>", "</table>"), "", ""))

Would it be possible to keep the HTML, or at least <a> tags? (What's the general policy of gallery-dl about HTML?)


Example pages to test on (NSFW)

@cinnamon-bun cinnamon-bun changed the title Preserve HTML in Furaffinity descriptions? Preserve links or HTML in Furaffinity descriptions? Jan 7, 2021
@cinnamon-bun
Copy link
Author

(For context: I'm making an indexer and gallery viewer for gallery-dl archives, so I want to preserve as much info as possible about authorship, comics sequences, etc.)

@mikf
Copy link
Owner

mikf commented Jan 20, 2021

Commit 89a2bcb adds a descriptions option for furaffinity, which allows you to disable any description text processing like remove_html, although there might be differences between the old and new fa layout:

$ gallery-dl -j -o descriptions=text https://www.furaffinity.net/view/35225276
...
      "description": "Ipad Commission for  with adorable spooky puppy!  ywy \r\n\r\n✨ My twitter ✨",

$ gallery-dl -j -o descriptions=html https://www.furaffinity.net/view/35225276
...
      "description": "</td>\n                </tr>\n                <tr>\n                    <td valign=\"top\" align=\"left\" width=\"70%\" class=\"alt1\" style=\"padding:8px\">\n                        Ipad Commission for <a href=\"/user/spookielee\" class=\"iconusername\"><img src=\"//a.facdn.net/20210120/spookielee.gif\" align=\"middle\" title=\"SpookieLee\" alt=\"SpookieLee\" /></a> with adorable spooky puppy! <i class=\"smilie love\"></i> ywy <i class=\"smilie love\"></i><br />\r\n<br />\r\n✨ <a class=\"auto_link named_url\" href=\"https://twitter.com/UlitochkaArt\">My twitter</a> ✨\n                                            </td>\n                </tr>",

@cinnamon-bun
Copy link
Author

Thank you!

@mikf mikf closed this as completed Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants