ytdl-org/youtube-dl · error · ExtractorError

Could not find video iframe in any portlets

Error message

Could not find video iframe in any portlets

What it means

Raised by the Ministry Grid (LifeWay) extractor after it iterated every 'portlet' listed on the page, downloaded each portlet fragment (fatal=False, so failures are tolerated), and found no <iframe ... src="..."> in any of them. The embedded video therefore cannot be located to hand off to the underlying player extractor. Not expected=True.

Source

Thrown at youtube_dl/extractor/ministrygrid.py:57

            video_id)
        pl_id = self._search_regex(
            r'getPlid:function\(\){return"(\d+)"}', webpage, 'p_l_id')

        for i, portlet in enumerate(portlets):
            portlet_url = 'http://www.ministrygrid.com/c/portal/render_portlet?p_l_id=%s&p_p_id=%s' % (pl_id, portlet)
            portlet_code = self._download_webpage(
                portlet_url, video_id,
                note='Looking in portlet %s (%d/%d)' % (portlet, i + 1, len(portlets)),
                fatal=False)
            video_iframe_url = self._search_regex(
                r'<iframe.*?src="([^"]+)"', portlet_code, 'video iframe',
                default=None)
            if video_iframe_url:
                return self.url_result(
                    smuggle_url(video_iframe_url, {'force_videoid': video_id}),
                    video_id=video_id)

        raise ExtractorError('Could not find video iframe in any portlets')

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Open the page in a browser and confirm where the video iframe now lives.
  2. Run with -v — the 'Looking in portlet ...' progress notes show which portlets were tried and what came back.
  3. Extract the iframe/player URL manually from the page source and pass it directly to youtube-dl.
  4. Update youtube-dl / yt-dlp; if unchanged, report the URL upstream.
Defensive patterns

Strategy: fallback

Validate before calling

# Pre-flight: confirm the page references at least one portlet fragment
import urllib.request
html = urllib.request.urlopen(page_url).read().decode('utf-8', 'replace')
assert 'portlet' in html.lower(), 'No portlets found; page layout likely changed'

Try / catch

try:
    info = ydl.extract_info(url, download=False)
except ExtractorError as e:
    if 'Could not find video iframe' in str(e):
        info = manual_iframe_harvest(url)  # fall back to pulling the iframe src by hand
    else:
        raise

Prevention

When it happens

Trigger: For every portlet URL, either the download failed silently (fatal=False yields None) or the iframe regex found no match, so video_iframe_url stayed falsy through the whole loop.

Common situations: LifeWay redesigning ministrygrid.com so portlets no longer embed iframes; portlet endpoints returning errors/redirects to a login page (making the regex miss); video pages migrated to a direct player URL; the site being retired.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/f4f569874bf1fde9. Report an issue: GitHub.