diff --git a/lib/onebox/engine/allowlisted_generic_onebox.rb b/lib/onebox/engine/allowlisted_generic_onebox.rb index e264abed398..0ccc8ebee0a 100644 --- a/lib/onebox/engine/allowlisted_generic_onebox.rb +++ b/lib/onebox/engine/allowlisted_generic_onebox.rb @@ -42,6 +42,10 @@ module Onebox %w(slideshare.net dailymotion.com livestream.com imgur.com flickr.com) end + def self.article_html_hosts + %w(imdb.com) + end + def self.host_matches(uri, list) !!list.find { |h| %r((^|\.)#{Regexp.escape(h)}$).match(uri.host) } end @@ -59,7 +63,7 @@ module Onebox end def placeholder_html - return article_html if is_article? + return article_html if (is_article? || force_article_html?) return image_html if is_image? return Onebox::Helpers.video_placeholder_html if is_video? || is_card? return Onebox::Helpers.generic_placeholder_html if is_embedded? @@ -150,7 +154,7 @@ module Onebox end def generic_html - return article_html if is_article? + return article_html if (is_article? || force_article_html?) return video_html if is_video? return image_html if is_image? return embedded_html if is_embedded? @@ -207,6 +211,10 @@ module Onebox options[:allowed_iframe_regexes]&.any? { |r| src =~ r } end + def force_article_html? + AllowlistedGenericOnebox.host_matches(uri, AllowlistedGenericOnebox.article_html_hosts) && (has_text? || is_image_article?) + end + def card_html escaped_url = ::Onebox::Helpers.normalize_url_for_output(data[:player]) diff --git a/spec/fixtures/onebox/imdb.response b/spec/fixtures/onebox/imdb.response new file mode 100644 index 00000000000..ac6bb7a3020 --- /dev/null +++ b/spec/fixtures/onebox/imdb.response @@ -0,0 +1,2186 @@ +Rudy (1993) - IMDb
+ + + + +
    • Release CalendarDVD & Blu-ray ReleasesTop Rated MoviesMost Popular MoviesBrowse Movies by GenreTop Box OfficeShowtimes & TicketsShowtimes & TicketsIn TheatersComing SoonComing SoonMovie NewsIndia Movie Spotlight
      What's on TV & StreamingWhat's on TV & StreamingTop Rated ShowsMost Popular ShowsBrowse TV Shows by GenreTV NewsIndia TV Spotlight
      What to WatchLatest TrailersIMDb OriginalsIMDb PicksIMDb Podcasts
      OscarsBest Picture WinnersBest Picture WinnersGolden GlobesEmmysLGBTQ+ Pride MonthSTARmeter AwardsSan Diego Comic-ConNew York Comic-ConSundance Film FestivalToronto Int'l Film FestivalAwards CentralFestival CentralAll Events
      Born TodayMost Popular CelebsMost Popular CelebsCelebrity News
      Help CenterContributor ZonePolls
    For Industry Professionals
      AllTitlesTV EpisodesCelebsCompaniesKeywords
    • Advanced Search
    Watchlist
    Sign In
    Welcome to the new version of this page.
    Learn more
    Report an issue
    +
    + +
    +
    +
    +

    Rudy

    • 19931993
    • PGPG
    • 1h 54min
    IMDb RATING
    7.5/10
    58K
    YOUR RATING
    POPULARITY
    4,074
    675
    • Cast & crew
    • User reviews
    • Trivia
    • IMDbPro
    Rudy (1993)
    Official Trailer
    Trailer2:01
    5 Videos
    31 Photos
    BiographyDramaSport

    Rudy has always been told that he was too small to play college football. But he is determined to overcome the odds and fulfill his dream of playing for Notre Dame.
    Rudy has always been told that he was too small to play college football. But he is determined to overcome the odds and fulfill his dream of playing for Notre Dame.
    Rudy has always been told that he was too small to play college football. But he is determined to overcome the odds and fulfill his dream of playing for Notre Dame.
    Rudy has always been told that he was too small to play college football. But he is determined to overcome the odds and fulfill his dream of playing for Notre Dame.
    Rudy has always been told that he was too small to play college football. But he is determined to overcome the odds and fulfill his dream of playing for Notre Dame.

    • Director
      • David Anspaugh
    • Writer
      • Angelo Pizzo
    • Stars
      • Sean Astin
      • Jon Favreau
      • Ned Beatty
    Top credits
    • Director
      • David Anspaugh
    • Writer
      • Angelo Pizzo
    • Stars
      • Sean Astin
      • Jon Favreau
      • Ned Beatty
  • See production, box office & company info
    • 200User reviews
    • 39Critic reviews
    • 71Metascore
  • See production, box office & company info
  • +
    + +
    +
    +
    +
    • Awards
      • 2 wins & 1 nomination
    +
    + +
    +
    +
    +

    Videos5

    Rudy
    Trailer 2:01
    Rudy
    Rudy
    Trailer 0:31
    Rudy
    What to Watch When You Need a Good Cry
    Clip 1:48
    What to Watch When You Need a Good Cry
    What to Watch When You Need a Good Cry
    Clip 2:25
    What to Watch When You Need a Good Cry
    When You Need a Good Cry
    Video 1:51
    When You Need a Good Cry

    Photos31

    Jon Favreau in Rudy (1993)
    Sean Astin in Rudy (1993)
    Rudy (1993)
    Sean Astin in Rudy (1993)
    Sean Astin in Rudy (1993)
    Sean Astin and Jon Favreau in Rudy (1993)
    Sean Astin in Rudy (1993)
    Sean Astin in Rudy (1993)
    Ned Beatty in Rudy (1993)
    Robert Prosky in Rudy (1993)
    Sean Astin and Robert Prosky in Rudy (1993)
    Sean Astin in Rudy (1993)
    +
    + +
    +
    +
    +

    Top cast

    Edit
    Sean Astin
    Sean Astin
    • Daniel E. 'Rudy' Ruettigeras Daniel E. 'Rudy' Ruettiger
    Jon Favreau
    Jon Favreau
    • D-Bobas D-Bob
    Ned Beatty
    Ned Beatty
    • Daniel Ruettigeras Daniel Ruettiger
    Greta Lind
    • Maryas Mary
    Scott Benjaminson
    • Frank Ruettigeras Frank Ruettiger
    Mary Ann Thebus
    • Bettyas Betty
    Charles S. Dutton
    Charles S. Dutton
    • Fortuneas Fortune
    Lili Taylor
    Lili Taylor
    • Sherryas Sherry
    Christopher Reed
    • Peteas Pete
    Deborah Wittenberg
    Deborah Wittenberg
    • Young Sherryas Young Sherry
    Christopher Erwin
    • 7-Year-Old Markas 7-Year-Old Mark
    Kevin Duda
    • 9-Year-Old Bernieas 9-Year-Old Bernie
    Robert Benirschke
    • 11-Year-Old Markas 11-Year-Old Mark
    Luke Massery
    • 13-Year-Old Rudyas 13-Year-Old Rudy
    Robert J. Steinmiller Jr.
    Robert J. Steinmiller Jr.
    • 13-Year-Old Peteas 13-Year-Old Pete
    Jake Armstrong
    • 13-Year-Old Bernieas 13-Year-Old Bernie
    John Duda
    • 15-Year-Old Frankas 15-Year-Old Frank
    Joseph Sikora
    Joseph Sikora
    • 17-Year-Old Johnnyas 17-Year-Old Johnny
    • Director
      • David Anspaugh
    • Writer
      • Angelo Pizzo
    • All cast & crew
    See production, box office, & company info

    More like this

    Miracle
    7.5
    Miracle
    Hoosiers
    7.5
    Hoosiers
    Invincible
    7.1
    Invincible
    Remember the Titans
    7.8
    Remember the Titans
    We Are Marshall
    7.1
    We Are Marshall
    Friday Night Lights
    7.2
    Friday Night Lights
    Major League
    7.2
    Major League
    The Natural
    7.5
    The Natural
    Glory Road
    7.2
    Glory Road
    Bull Durham
    7.1
    Bull Durham
    42
    7.5
    42
    The Blind Side
    7.6
    The Blind Side
    +
    + +
    +
    +
    +

    Storyline

    Edit
    Rudy grew up in a steel mill town where most people ended up working, but wanted to play football at Notre Dame instead. There were only a couple of problems. His grades were a little low, his athletic skills were poor, and he was only half the size of the other players. But he had the drive and the spirit of 5 people and has set his sights upon joining the team. —Brian W Martz <B.Martz@Genie.com>
    dyslexiamotivationcollege footballnotre dame fighting irishfootball movie42 more
    • Plot summary
    • Plot synopsis
    • Taglines
      • When people say dreams don't come true, tell them about Rudy
    • Genres
      • Biography
      • Drama
      • Sport
    • Motion Picture Rating (MPAA)
      • Rated PG for mild language
    • Parents guide

    Did you know

    Edit
    • Trivia
      In the final six minutes of the film, the real-life Rudy Ruettiger has a cameo appearance as a Notre Dame fan sitting in the football stands. While the crowd is shouting "Rudy, Rudy," the camera points to the crowd then cuts to a close-up of Rudy's "father" and "brother." Daniel 'Rudy' Ruettiger can be seen to the left of his "father" (Ned Beatty). Rudy is wearing a plaid driving cap and a dark coat with a white fur collar. Later during the cheering, his father turns and playfully bats at the real Rudy.
    • Goofs
      Coach Dan Devine actually insisted that Rudy play in the final game.
    • Quotes

      Fortune: You're 5 foot nothin', 100 and nothin', and you have barely a speck of athletic ability. And you hung in there with the best college football players in the land for 2 years. And you're gonna walk outta here with a degree from the University of Notre Dame. In this life, you don't have to prove nothin' to nobody but yourself. And after what you've gone through, if you haven't done that by now, it ain't gonna never happen. Now go on back.

    • Crazy credits
      This is one of the few films in which the infamous "Alan Smithee" is given directorial credit for ONLY the commercial TV version. If viewed on VHS, DVD, pay cable etc... David Anspaugh is given his proper credit as director in the opening credits. However the editing for extra commercials on the free TV version is done so heavily -which alters the context- that Mr Smithee is the "director" when this film is shown there.
    • Alternate versions
      Severely cut TV version was disowned by director David Anspaugh. The credited director on this version is "Alan Smithee".
    • Connections
      Featured in At the Movies: Rudy/A Life in the Theatre/Gettysburg/Farewell, My Concubine/Mr. Jones (1993)
    • Soundtracks
      Notre Dame Victory March
      Written by John F. Shea and Michael J. Shea (as Rev. Michael J. Shea)

      Performed by The Notre Dame Glee Club (as University of Notre Dame Glee Club)

      Courtesy of University of Notre Dame

    User reviews200

    Review
    Top review
    Enjoyed it very much...
    I found the movie to be inspirational, a little cliched and always interesting. Sean Astin made me believe in the character he played and I also enjoyed Charles S. Dutton. You know how the movie will end, unless you were born yesterday, but its still satisfying and I wasn't ashamed to shed a tear....
    helpful•35
    4
    • Boyo-2
    • Aug 3, 1999

    Details

    Edit
    • Release date
      • October 22, 1993 (United States)
    • Country of origin
      • United States
    • Languages
      • English
      • Spanish
    • Also known as
      • 豪情好傢伙
    • Filming locations
      • Holy Cross College - 54515 State Road 933 N., Notre Dame, Indiana, USA
    • Production company
      • TriStar Pictures
    • See more company credits at IMDbPro

    Box office

    Edit
    • Gross US & Canada
      • $22,881,563
    • Opening weekend US & Canada
      • $881,191
      • Oct 17, 1993
    • Gross worldwide
      • $22,881,563
    See detailed box office info on IMDbPro

    Technical specs

    Edit
    • Runtime
      • 1h 54min
    • Color
      • Color
    • Sound mix
      • Dolby SR
    • Aspect ratio
      • 1.85 : 1

    Related news

    ‘Hoosiers’ Screenwriter Angelo Pizzo Tapped to Adapt Sally Jenkins’ Book for Standing Arrow Productions (Exclusive)
    ‘Hoosiers’ Screenwriter Angelo Pizzo Tapped to Adapt Sally Jenkins’ Book for Standing Arrow Productions (Exclusive)
    May 16Variety Film + TV
    Trojan Records Sets 50th-Anniversary Reissue of ‘The Trojan Story’
    Trojan Records Sets 50th-Anniversary Reissue of ‘The Trojan Story’
    May 12Rollingstone.com

    Contribute to this page

    Edit page
    • Getting started
    • Contributor Zone
    +
    + +
    +
    +
    +

    More to explore

    View list
    List
    IMDb's Summer Movie Preview
    See the full list
    View list
    List
    What TV Shows Are Renewed or Canceled?
    See the list

    Around the web

    Powered by Taboola
    +
    + + +
    +
    +
    + +
    +
    +
    +

    Recently viewed

    You have no recently viewed pages
    +
    + +
    +
    +
    +
    Get the IMDb App
    • Get the IMDb App
    • Help
    • Site Index
    • IMDbPro
    • Box Office Mojo
    • IMDb Developer
    • Press Room
    • Advertising
    • Jobs
    • Conditions of Use
    • Privacy Policy
    • Interest-Based Ads

    © 1990-2021 by IMDb.com, Inc.

    + + + + +
    + + + +
    diff --git a/spec/lib/onebox/engine/allowlisted_generic_onebox_spec.rb b/spec/lib/onebox/engine/allowlisted_generic_onebox_spec.rb index b66c91c14fc..46991aa74a9 100644 --- a/spec/lib/onebox/engine/allowlisted_generic_onebox_spec.rb +++ b/spec/lib/onebox/engine/allowlisted_generic_onebox_spec.rb @@ -182,4 +182,21 @@ describe Onebox::Engine::AllowlistedGenericOnebox do end end end + + describe 'article html hosts' do + context 'returns article_html for hosts in article_html_hosts' do + before do + stub_request(:get, "https://www.imdb.com/title/tt0108002/") + .to_return(status: 200, body: onebox_response('imdb')) + end + + it 'shows article onebox' do + onebox = described_class.new("https://www.imdb.com/title/tt0108002/") + expect(onebox.to_html).to include("https://www.imdb.com/title/tt0108002") + expect(onebox.to_html).to include("https://m.media-amazon.com/images/M/MV5BZGUzMDU1YmQtMzBkOS00MTNmLTg5ZDQtZjY5Njk4Njk2MmRlXkEyXkFqcGdeQXVyNjc1NTYyMjg@._V1_FMjpg_UX1000_.jpg") + expect(onebox.to_html).to include("Rudy (1993) - IMDb") + expect(onebox.to_html).to include("Rudy: Directed by David Anspaugh. With Sean Astin, Jon Favreau, Ned Beatty, Greta Lind. Rudy has always been told that he was too small to play college football.") + end + end + end end