Social video embeds¶
V2.1SOCIALVIDEOEMBEDS stores supplied embedded video or social-post URLs. format_social_video_embeds formats the collection as one GKG cell.
Requirements¶
Core package and caller-supplied metadata. No article retrieval or NLP model is required.
Example¶
from gdelt_regkg.fields.metadata import format_social_video_embeds
urls = ["https://example.org/posts/video"]
print(format_social_video_embeds(urls))
assert format_social_video_embeds([]) == ""
assert format_social_video_embeds(None) is None
Behavior¶
Supply a collection of absolute HTTP(S) URLs without whitespace. Entries are separated by ;. Order and duplicates are preserved. Literal semicolons inside URLs become %3B, and existing percent escapes are unchanged.
An empty collection means no matching media. None means metadata is unavailable. A prejoined string is rejected.
In RecordMetadata, pass social_video_embeds=. An encoded overrides["V2.1SOCIALVIDEOEMBEDS"] override takes precedence.
Limitations¶
Identify video embeds and normalize provider URLs before formatting. Resolve relative URLs yourself. The library does not retrieve pages or verify their media content.