-
-
Notifications
You must be signed in to change notification settings - Fork 975
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
[newgrounds] Add post_url
and HTML content of comment
#2328
Comments
Also For example: https://www.newgrounds.com/portal/view/741256 In HTML:
However, |
The content (HTML code) of |
post_url
post_url
and HTML content of comment
In one post:
|
But missed HTML in |
I don't want to touch the current For example for https://www.newgrounds.com/art/view/tomfulp/ryu-is-hawt it is
but would become this bloated mess when leaving all HTML tags in:
I could add an option for that like with Keys starting with an underscore get ignored by -K, but you can view them with -j by enabling Newgrounds in particular has a lot of backwards compatibility baggage, like "{num} is None for the first image", which is the result of it expecting there being only one file per post, combined with trying to preserve filenames and archive keys when adding support for multiple files per post.
Do you have an example where this shouldn't be the case? |
|
I faced the similar problem with kemonoparty's subscribestar posts, which have extra function fixHTML(html) {
html = html.replaceAll("\n", "<br>");
if (service === "subscribestar") {
const e = document.createElement("div");
e.innerHTML = html;
return e.innerHTML.replaceAll(" ", " ");
}
return html;
} I think you can do the same thing. Create an element object from non-valid HTML, then get the valid HTML from the element object. |
Wait, it's a valid HTML. If you want correctly remove |
I would like to have a key (
post_url
) that leads to the post.The value of it is for images:
https://www.newgrounds.com/art/view/{user}/{filename.split("_").slice(2).join("")}
(Not tested, should work.)
for videos:
https://www.newgrounds.com/portal/view/{index}
It would be useful in HTMLs generated with
postprocessors
:Formatted HTML:
Currently it (concated HTMLs) looks so:
(With just
{title}
instead of<a href='{post_url}'>{title}</a>
.)By the way:
{num}
isNone
for the first image.{_index}
is not listed with-K
The text was updated successfully, but these errors were encountered: