Friday 16 March 2018

Select script type in jsoup | JSoup to parse script tag

You can parse script tag using doc.select method.

See below Example to select:

doc.select("script[type=application/ld+json]")
doc.select("script[type=text/javascript")

This will select the desired script tag with text inside for use.

No comments:

Post a Comment