The stupid question is the question not asked | |
PerlMonks |
Re: Quick 'n dirty extraction of JSON from an HTML pageby davies (Prior) |
on Mar 08, 2021 at 20:30 UTC ( [id://11129352]=note: print w/replies, xml ) | Need Help?? |
I think it would help to split your problem space conceptually between the scraping and the parsing. As far as scraping is concerned, Selenium is a very good tool for automating multiple browsers and testing against them. If all you need is a single browser, look at, say, WWW::Mechanize::Chrome. But do you actually need a browser? If not, LWP is probably all you need. And Dave Cross is the publisher of that book, not the author. On to the parsing, I have tried a cut down version of your JSON. My code is:
Does that give you what you need? If not, you may need to specify your problem more clearly. Regards, John Davies
In Section
Seekers of Perl Wisdom
|
|