Skip to content

Conversation

tomByrer
Copy link

I removed striptags since I wanted to keep the <b><i><u> formatting. But, I did remove all the <font> tags, since I've usually only seen spammy auto-generated colorization and almost never YouTube caption uploaders bother with font colors. I haven't seen other formatting in captions from the API, so don't have to worry about other markup, including malicious.

BTW, YouTube doesn't use their API nor most formatting from other formats, they seem to use use their own formatting. Any uploads & in-app edits are heavily filtered, unless you use their magic format.

I updated the test to reflect my desires. Also made minor version updates in package.json.
API remains the same, but slightly different outupt, so v1.1.0

@Haroenv
Copy link
Contributor

Haroenv commented Jan 27, 2019

I think this could be considered a breaking change?

@tomByrer
Copy link
Author

Breaking, how so? Seems YT already strips all tags in their API except <font> <b> <i> <u>.
Maybe you guys need all the tags stripped, I'd like to keep them.

I think it was only bumped to minor version .0.0.1 when HTML stripping was added.

This is not a request that should be merged, but just sharing what I did, like a good open-source user. :)

@iam4x
Copy link
Contributor

iam4x commented Jan 28, 2019

Hey 👋

Thanks for the contribution,

I think we should expose this with an option so it doesn't break the existing applications using this module.

@tomByrer
Copy link
Author

Do you mean leaving in <b> <i> <u>. as an option?
I guess I could, but it would be after I finish my current project.

@tomByrer
Copy link
Author

I'm still not sure how to strip all tags while keeping the codebase small as possible....
Maybe I'll make a 'friendly fork' & call it:
YouTube-captions-scraper-WTF

  • With Text Formatting ;)

@Haroenv
Copy link
Contributor

Haroenv commented Feb 7, 2019

That makes sense too @tomByrer, keep us updated!

@Haroenv
Copy link
Contributor

Haroenv commented Apr 27, 2020

@tomByrer, what do you think of taking over the project? I think the most straightforward would be that we deprecate ours and you publish your own?

@tomByrer
Copy link
Author

Since Maybe I should just make a PR to remove lodash, you can have a last release for the people who still use this, then archive it with a link to mine?

@Haroenv
Copy link
Contributor

Haroenv commented Apr 27, 2020

If you make a simple PR just to remove lodash we can definitely review that, but a whole rewrite will take a bit of time, in which case having a totally different fork is easier I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants