Re: Parsing Javascript simply


Graham Cox
 

Thanks - indeed simple to try, but unfortunately doesn’t work in this case.

I’ll try loading it into an off-screen WKWebView.

—Graham



On 3 Dec 2019, at 12:47 pm, Quincey Morris <quinceymorris@...> wrote:

I tried something similar recently, and got better-than-anticipated results using this NSAttributedString initializer:


IIRC, this gave me an attributed string with (Javascript-generated) links embedded, so you might have to scan for ”a” tags instead of “video” tags. I dunno, it might not work for you, but it should be simple to try.


Join cocoa@apple-dev.groups.io to automatically receive all group messages.