Coder Social home page Coder Social logo

Comments (11)

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

This is probably linked to this: praw-dev/praw#726

from draw.

bkonyi avatar bkonyi commented on June 18, 2024

Thanks for the issue @StefanLobbenmeier!

The reason why there's not getters for each property is that Reddit doesn't have a complete listing of the possible properties and the API doesn't consistently return the same properties for each request. The getters that are there are the ones which I've seen consistently, but they're by no means a complete set.

Do you happen to know what the different types of content can be? If so, I'm happy to accept pull requests or design input!

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

Sry for the late response. I will look into this, but I am currently concentrating on more basic parts of the API, but I expect I will investigate this further in a few month.

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

I hope you dont mind if I use this issue to document my findings - I want to gather as many examples of media before thinking about a good design.

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

gyfcat (link has video, other metadata available)

media_embed: {content: <iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fconstantdecimalkarakul&url=https%3A%2F%2Fgfycat.com%2Fconstantdecimalkarakul&image=https%3A%2F%2Fthumbs.gfycat.com%2FConstantDecimalKarakul-size_restricted.gif&key=ed8fa8699ce04833838e66ce79ba05f1&type=text%2Fhtml&schema=gfycat" width="600" height="338" scrolling="no" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="true"></iframe>, width: 600, scrolling: false, height: 338}
secure_media: {type: gfycat.com, oembed: {provider_url: https://gfycat.com, description: Watch xD GIF by @tomyhy on Gfycat. Discover more related GIFs on Gfycat, title: xD, thumbnail_width: 444, height: 338, width: 600, html: <iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fconstantdecimalkarakul&url=https%3A%2F%2Fgfycat.com%2Fconstantdecimalkarakul&image=https%3A%2F%2Fthumbs.gfycat.com%2FConstantDecimalKarakul-size_restricted.gif&key=ed8fa8699ce04833838e66ce79ba05f1&type=text%2Fhtml&schema=gfycat" width="600" height="338" scrolling="no" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="true"></iframe>, version: 1.0, provider_name: Gfycat, thumbnail_url: https://thumbs.gfycat.com/ConstantDecimalKarakul-size_restricted.gif, type: video, thumbnail_height: 250}}
is_reddit_media_domain: false
secure_media_embed: {content: <iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fconstantdecimalkarakul&url=https%3A%2F%2Fgfycat.com%2Fconstantdecimalkarakul&image=https%3A%2F%2Fthumbs.gfycat.com%2FConstantDecimalKarakul-size_restricted.gif&key=ed8fa8699ce04833838e66ce79ba05f1&type=text%2Fhtml&schema=gfycat" width="600" height="338" scrolling="no" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="true"></iframe>, width: 600, scrolling: false, media_domain_url: https://www.redditmedia.com/mediaembed/7s6y7w, height: 338}
media_only: false
url: https://gfycat.com/ConstantDecimalKarakul
media: {type: gfycat.com, oembed: {provider_url: https://gfycat.com, description: Watch xD GIF by @tomyhy on Gfycat. Discover more related GIFs on Gfycat, title: xD, thumbnail_width: 444, height: 338, width: 600, html: <iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fconstantdecimalkarakul&url=https%3A%2F%2Fgfycat.com%2Fconstantdecimalkarakul&image=https%3A%2F%2Fthumbs.gfycat.com%2FConstantDecimalKarakul-size_restricted.gif&key=ed8fa8699ce04833838e66ce79ba05f1&type=text%2Fhtml&schema=gfycat" width="600" height="338" scrolling="no" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="true"></iframe>, version: 1.0, provider_name: Gfycat, thumbnail_url: https://thumbs.gfycat.com/ConstantDecimalKarakul-size_restricted.gif, type: video, thumbnail_height: 250}}

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

imgur (link has video, no other data):

media_embed: {}
secure_media: null
is_reddit_media_domain: false
secure_media_embed: {}
media_only: false
url: https://i.imgur.com/4a3Ch82.gifv
media: null

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

Reddit video

media_embed: {}
secure_media: {reddit_video: {fallback_url: https://v.redd.it/yaydjqjx91o21/DASH_1080?source=fallback, height: 1080, width: 540, scrubber_media_url: https://v.redd.it/yaydjqjx91o21/DASH_240, dash_url: https://v.redd.it/yaydjqjx91o21/DASHPlaylist.mpd, duration: 14, hls_url: https://v.redd.it/yaydjqjx91o21/HLSPlaylist.m3u8, is_gif: false, transcoding_status: completed}}
is_reddit_media_domain: true
secure_media_embed: {}
media_only: false
url: https://v.redd.it/yaydjqjx91o21
media: {reddit_video: {fallback_url: https://v.redd.it/yaydjqjx91o21/DASH_1080?source=fallback, height: 1080, width: 540, scrubber_media_url: https://v.redd.it/yaydjqjx91o21/DASH_240, dash_url: https://v.redd.it/yaydjqjx91o21/DASHPlaylist.mpd, duration: 14, hls_url: https://v.redd.it/yaydjqjx91o21/HLSPlaylist.m3u8, is_gif: false, transcoding_status: completed}}

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

Youtube

media_embed: {content: <iframe width="600" height="338" src="https://www.youtube.com/embed/coR4Y-DkrLc?feature=oembed&enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>, width: 600, scrolling: false, height: 338}
secure_media: {type: youtube.com, oembed: {provider_url: https://www.youtube.com/, version: 1.0, title: Pagination in Flutter using Firebase's Cloud Firestore, type: video, thumbnail_width: 480, height: 338, width: 600, html: <iframe width="600" height="338" src="https://www.youtube.com/embed/coR4Y-DkrLc?feature=oembed&enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>, author_name: Samarth Agarwal, provider_name: YouTube, thumbnail_url: https://i.ytimg.com/vi/coR4Y-DkrLc/hqdefault.jpg, thumbnail_height: 360, author_url: https://www.youtube.com/user/thesamarthagarwal}}
is_reddit_media_domain: false
secure_media_embed: {content: <iframe width="600" height="338" src="https://www.youtube.com/embed/coR4Y-DkrLc?feature=oembed&enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>, width: 600, scrolling: false, media_domain_url: https://www.redditmedia.com/mediaembed/b4ap7n, height: 338}
media_only: false
url: https://www.youtube.com/watch?v=coR4Y-DkrLc
media: {type: youtube.com, oembed: {provider_url: https://www.youtube.com/, version: 1.0, title: Pagination in Flutter using Firebase's Cloud Firestore, type: video, thumbnail_width: 480, height: 338, width: 600, html: <iframe width="600" height="338" src="https://www.youtube.com/embed/coR4Y-DkrLc?feature=oembed&enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>, author_name: Samarth Agarwal, provider_name: YouTube, thumbnail_url: https://i.ytimg.com/vi/coR4Y-DkrLc/hqdefault.jpg, thumbnail_height: 360, author_url: https://www.youtube.com/user/thesamarthagarwal}}

from draw.

bkonyi avatar bkonyi commented on June 18, 2024

I hope you dont mind if I use this issue to document my findings - I want to gather as many examples of media before thinking about a good design.

Not a problem! Sorry I haven't had more time to work on this myself. Hopefully I can spend some more time on this soon...

from draw.

donovanrost avatar donovanrost commented on June 18, 2024

Adding to @StefanLobbenmeier examples of media. This gfycat example has

"reddit_video_preview": {
                                "fallback_url": "https://v.redd.it/7fpx9a4xvi431/DASH_360",
                                "height": 360,
                                "width": 640,
                                "scrubber_media_url": "https://v.redd.it/7fpx9a4xvi431/DASH_96",
                                "dash_url": "https://v.redd.it/7fpx9a4xvi431/DASHPlaylist.mpd",
                                "duration": 61,
                                "hls_url": "https://v.redd.it/7fpx9a4xvi431/HLSPlaylist.m3u8",
                                "is_gif": true,
                                "transcoding_status": "completed"
                            },

Which has a link to the video/gif

from draw.

StefanLobbenmeier avatar StefanLobbenmeier commented on June 18, 2024

@donovanrost Thanks for the input :) I actually decided against pursuing this issue further, since I can get away with basically ignoring the fields and only working with the url. I use this library (shameless plug, its my own) to convert them https://github.com/StefanLobbenmeier/video_provider and the mp4 gives me all the metadata I need. Will close for now.

from draw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.