2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-03 23:54:20 +08:00
discourse/spec/fixtures/onebox
Rafael dos Santos Silva bab1033758
FIX: Switch Reddit onebox from OG scraping to JSON API (#38035)
Reddit removed OpenGraph meta tags from their HTML responses, so
oneboxing fails silently. This switches to fetching from Reddit's
`.json` API endpoint instead.

- Fetches post data from `.json` endpoint (appended to post URL)
- Supports image, video, and self/text posts
- Adds `matches_path` to restrict to actual post URLs
- Adds `old.reddit.com`, `np.reddit.com`, `new.reddit.com` support
- Flex-based layout for video post thumbnails (avoids legacy float
issues)


<img width="949" height="1434" alt="image"
src="https://github.com/user-attachments/assets/40b3f4fa-ace5-4dd1-97a9-45d9497037e4"
/>
2026-02-24 15:29:00 -03:00
..
amazon-alternate.response FIX: Support new layout on Amazon product pages (#16091) 2022-03-04 18:31:53 -05:00
amazon-ebook.response
amazon-error.response
amazon-og.response FIX: correctly unescape title for amazon oneboxes (#33010) 2025-06-02 17:50:13 +05:30
amazon.response
assemblyai.response FIX: ensures generic onebox has width/height for thumbnail (#23040) 2023-08-09 20:31:11 +02:00
audio_com_audio_oembed.response FEATURE: Add audio.com onebox provider (#22936) 2023-08-08 16:55:04 +10:00
audio_com_collection_oembed.response FEATURE: Add audio.com onebox provider (#22936) 2023-08-08 16:55:04 +10:00
basic_description.response
cloudapp-gif.response
cloudapp-jpg.response
cloudapp-mp4.response
cloudapp-others.response
cnn.response
dailymail.response
discourse_topic.response FIX: remove ItemList schema from linkbacks in crawler view (#36608) 2025-12-11 10:41:47 +01:00
discourse_topic_reply.response FIX: remove ItemList schema from linkbacks in crawler view (#36608) 2025-12-11 10:41:47 +01:00
etsy.response
etsy_mobile.response
gfycat.response
giphy.response
github_issue_onebox.response SECURITY: Onebox templates' HTML injections. 2023-11-09 13:39:11 +11:00
githubactions_actions_run.response
githubactions_pr.response
githubactions_pr_run.response
githubblob.response
githubcommit.response
githubfolder-discourse-root.response
githubfolder-rdoc-root.response
githubfolder.response
githubgist.response
githubpullrequest.response FEATURE: Remove unnecessary org names from PR oneboxes (#31102) 2025-02-01 01:05:08 +01:00
githubpullrequest_comment.response FEATURE: Handle oneboxes for complex GitHub URLs (#18474) 2022-10-06 20:26:04 +03:00
githubpullrequest_commit.response FEATURE: Handle oneboxes for complex GitHub URLs (#18474) 2022-10-06 20:26:04 +03:00
githubrepo.response FEATURE: Allow oneboxing private GitHub repo URLs and add private indicator to HTML (#27947) 2024-07-19 12:21:45 +10:00
gitlabblob.response
googledocs.response
googledrive.response
googlephotos.response
googleplayapp.response
hackernews_comment.response
hackernews_story.response
image.response
imdb.response
imgur.response
instagram.response
instagram_new.response
instagram_old.response
kaltura.response
meetup.response.html
meetup_oembed.response
missing_description.response
missing_description_and_image.response
missing_image.response
pubmed-electronic-xml.response
pubmed-electronic.response
pubmed-xml.response
pubmed.response
reddit_image.response FIX: Switch Reddit onebox from OG scraping to JSON API (#38035) 2026-02-24 15:29:00 -03:00
reddit_self_post.response FIX: Switch Reddit onebox from OG scraping to JSON API (#38035) 2026-02-24 15:29:00 -03:00
reddit_video.response FIX: Switch Reddit onebox from OG scraping to JSON API (#38035) 2026-02-24 15:29:00 -03:00
slides.response
spotify.response FEATURE: Support Spotify Onebox (#27540) 2024-06-19 13:27:27 -03:00
stackexchange-answer.response
stackexchange-question.response
tenor.response
threadsstatus_featured_image.response FEATURE: Basic support for threads.net onebox (#22471) 2023-07-06 16:02:49 -03:00
threadsstatus_profile.response FEATURE: Basic support for threads.net onebox (#22471) 2023-07-06 16:02:49 -03:00
threadsstatus_without_image.response FEATURE: Basic support for threads.net onebox (#22471) 2023-07-06 16:02:49 -03:00
title_no_description.response FIX: Allow oneboxes with no description (#31518) 2025-02-26 13:16:51 +10:00
twitterstatus.response FIX: Use Twitter API v2 for oneboxes and restore OpenGraph fallback (#22187) 2023-06-22 14:39:02 -03:00
twitterstatus_featured_image.response FIX: Use Twitter API v2 for oneboxes and restore OpenGraph fallback (#22187) 2023-06-22 14:39:02 -03:00
twitterstatus_noclient.response FIX: avoid error from missing meta tags (#26927) 2024-05-14 11:41:53 -04:00
twitterstatus_quoted.response FIX: Use Twitter API v2 for oneboxes and restore OpenGraph fallback (#22187) 2023-06-22 14:39:02 -03:00
video.response
video_missing_description.response
wikimedia.response
wikipedia.response FIX: Wikipedia onebox images and sections (#31384) 2025-02-19 14:29:17 +10:00
wikipedia_url_encoded.response FIX: Wikipedia onebox images and sections (#31384) 2025-02-19 14:29:17 +10:00
wikipediaredirected.response
xkcd.response
xstatus_noclient.response DEV: Add spec for x.com onebox url matcher (#27214) 2024-05-28 09:04:20 -03:00
youku-meta.response
youku.response
youtube-channel.response
youtube-embed.response
youtube-playlist.response
youtube-shorts.response FEATURE: Youtube Short onebox support (#19335) 2022-12-06 11:56:48 -03:00
youtube.response