{"record":{"id":"f4f569874bf1fde9","repo":"ytdl-org/youtube-dl","slug":"could-not-find-video-iframe-in-any-portlets","errorCode":null,"errorMessage":"Could not find video iframe in any portlets","messagePattern":"Could not find video iframe in any portlets","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/ministrygrid.py","lineNumber":57,"sourceCode":"            video_id)\n        pl_id = self._search_regex(\n            r'getPlid:function\\(\\){return\"(\\d+)\"}', webpage, 'p_l_id')\n\n        for i, portlet in enumerate(portlets):\n            portlet_url = 'http://www.ministrygrid.com/c/portal/render_portlet?p_l_id=%s&p_p_id=%s' % (pl_id, portlet)\n            portlet_code = self._download_webpage(\n                portlet_url, video_id,\n                note='Looking in portlet %s (%d/%d)' % (portlet, i + 1, len(portlets)),\n                fatal=False)\n            video_iframe_url = self._search_regex(\n                r'<iframe.*?src=\"([^\"]+)\"', portlet_code, 'video iframe',\n                default=None)\n            if video_iframe_url:\n                return self.url_result(\n                    smuggle_url(video_iframe_url, {'force_videoid': video_id}),\n                    video_id=video_id)\n\n        raise ExtractorError('Could not find video iframe in any portlets')\n","sourceCodeStart":39,"sourceCodeEnd":58,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/ministrygrid.py#L39-L58","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the page in a browser and confirm where the video iframe now lives.","Run with -v — the 'Looking in portlet ...' progress notes show which portlets were tried and what came back.","Extract the iframe/player URL manually from the page source and pass it directly to youtube-dl.","Update youtube-dl / yt-dlp; if unchanged, report the URL upstream."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# Pre-flight: confirm the page references at least one portlet fragment\nimport urllib.request\nhtml = urllib.request.urlopen(page_url).read().decode('utf-8', 'replace')\nassert 'portlet' in html.lower(), 'No portlets found; page layout likely changed'","typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url, download=False)\nexcept ExtractorError as e:\n    if 'Could not find video iframe' in str(e):\n        info = manual_iframe_harvest(url)  # fall back to pulling the iframe src by hand\n    else:\n        raise","preventionTips":["Verify ministrygrid pages still embed iframes in a browser before batch runs.","Capture the portlet list with -v ('Looking in portlet ...') to spot login-redirected fragments early."],"tags":["iframe","scrape-failure","portlet"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}