-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
An URL such as https://www.instagram.com/p/CmHTCMoJSV5/ emits empty string for data because the result of document?.head ?.querySelector("script[type='application/ld+json']") is <html script> at the following method in JsonLdParser.
It produces an exception, FormatException: Unexpected end of input (at character 1)
metadata_fetch/lib/src/parsers/jsonld_parser.dart
Lines 18 to 27 in 0ae3094
| dynamic _parseToJson(Document? document) { | |
| final data = document?.head | |
| ?.querySelector("script[type='application/ld+json']") | |
| ?.innerHtml; | |
| if (data == null) { | |
| return null; | |
| } | |
| var d = jsonDecode(data); | |
| return d; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels