← Back to context

Comment by rkangel

3 years ago

This is the compiler writer equivalent of parsing HTML with regex:

It is technically wrong - it isn't a sufficiently rich and powerful approach to handle all JS (HTML) that you might throw at it. It'll work for a while until it eventually barfs when you least expect it.

EXCEPT that if the inputs you are giving it come from some understood source(s) that aren't likely to change, then a simpler approach to the "all singing all dancing" correct may be appropriate and justified. E.g. because it might be easier to write, easier to maintain and/or less attack surface etc.

> some understood source(s) that aren't likely to change

Does that apply to YouTube? Or any of the other hundreds of supported sites?

  • Presumably because it gets tested with those sites and the JS doesn't change that much it can be fixed or adjusted as required.