Skip to content

feat(audio/video): add support for ld+json contentUrl property #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 30, 2021

Conversation

Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Jan 30, 2021

by @goleary

closes #353

Adds support for extracting audio/video URLs from the contentUrl property in ld+json.

I have not come across a page that uses this for video urls (perhaps because I haven't been looking) but I decided to go ahead and add support for video too since the schema.org docs call out:

contentUrl: Actual bytes of the media object, for example the image file or video file.

I should probably figure out how to write my own integration tests at some point huh @Kikobeats. Feel free to add them yourself or point me in the right direction and I can do it myself.

Here are the URLs I was using to test:

"https://www.nytimes.com/2021/01/26/opinion/ezra-klein-podcast-vivek-murthy.html",
"https://www.nytimes.com/2020/11/19/opinion/sway-kara-swisher-raj-chetty.html",

goleary and others added 4 commits January 29, 2021 18:08

Verified

This commit was signed with the committer’s verified signature.
Kikobeats Kiko Beats

Verified

This commit was signed with the committer’s verified signature.
Kikobeats Kiko Beats

Verified

This commit was signed with the committer’s verified signature.
Kikobeats Kiko Beats
@Kikobeats Kikobeats merged commit eb17d3e into master Jan 30, 2021
@Kikobeats Kikobeats deleted the goleary-master branch January 30, 2021 11:12
@goleary
Copy link
Collaborator

goleary commented Jan 30, 2021

Awesome, thanks @Kikobeats!

@Kikobeats
Copy link
Member Author

shipped at v5.17.0

Also, available at Microlink API
http://api.microlink.io/?url=https%3A%2F%2Fwww.nytimes.com%2F2021%2F01%2F26%2Fopinion%2Fezra-klein-podcast-vivek-murthy.html&audio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[metascraper-audio] Pull Audio file from Schema.org ld+json
2 participants