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)
|
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; |
|
} |
An URL such as
https://www.instagram.com/p/CmHTCMoJSV5/emits empty string fordatabecause the result ofdocument?.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