hi there! :wave: I’m creating a web scraper for bl...
# skrape-it
d
hi there! 👋 I’m creating a web scraper for blog posts.. and one thing I found in common to extract the title, author, etc.. would be the <script type=“application/ld+json”> if this does not contain all the info wanted, I’ll provide alternatives for the different scenarios. could you point me to some examples on how to extract the
ld+json
script content? thanks in advance 😄
with some try-error I found my way, thanks! I’ll leave here an example:
Copy code
val jsonLdString = script {
              withAttribute = "type" to "application/ld+json"
              findFirst {
                html
              }
            }
c
Yes that looks good :)