{"record":{"id":"071aca04cd6600f0","repo":"ytdl-org/youtube-dl","slug":"the-video-is-not-available-from-your-location","errorCode":null,"errorMessage":"The video is not available from your location","messagePattern":"The video is not available from your location","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/francetv.py","lineNumber":112,"sourceCode":"            'https://sivideo.webservices.francetelevisions.fr/tools/getInfosOeuvre/v2/',\n            video_id, 'Downloading video JSON', query={\n                'idDiffusion': video_id,\n                'catalogue': catalogue or '',\n            })\n\n        if info.get('status') == 'NOK':\n            raise ExtractorError(\n                '%s returned error: %s' % (self.IE_NAME, info['message']),\n                expected=True)\n        allowed_countries = info['videos'][0].get('geoblocage')\n        if allowed_countries:\n            georestricted = True\n            geo_info = self._download_json(\n                'http://geo.francetv.fr/ws/edgescape.json', video_id,\n                'Downloading geo restriction info')\n            country = geo_info['reponse']['geo_info']['country_code']\n            if country not in allowed_countries:\n                raise ExtractorError(\n                    'The video is not available from your location',\n                    expected=True)\n        else:\n            georestricted = False\n\n        def sign(manifest_url, manifest_id):\n            for host in ('hdfauthftv-a.akamaihd.net', 'hdfauth.francetv.fr'):\n                signed_url = url_or_none(self._download_webpage(\n                    'https://%s/esi/TA' % host, video_id,\n                    'Downloading signed %s manifest URL' % manifest_id,\n                    fatal=False, query={\n                        'url': manifest_url,\n                    }))\n                if signed_url:\n                    return signed_url\n            return manifest_url\n\n        is_live = None","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/francetv.py#L94-L130","documentation":"Raised by FranceTV's _extract_video when the video declares a 'geoblocage' country whitelist and the requester's country (from the geo.francetv.fr edgescape lookup) is not on it. It is an expected, deliberate geo-restriction error; most France TV content is limited to France and French territories.","triggerScenarios":"info['videos'][0]['geoblocage'] is truthy, the edgescape.json lookup returns a country_code, and that code is not in the allowed list. Triggered by requesting FranceTV videos from outside the whitelisted countries without a French IP.","commonSituations":"Traveling French users or expats; VPN exits in non-FR regions; scripts running on non-French cloud servers (US/EU datacenter IPs).","solutions":["Route traffic through a French IP (VPN/proxy with a France exit node)","Pass --proxy to youtube-dl with a French proxy: --proxy socks5://user:pass@fr-host:1080","Verify the content is actually geo-free in some regions (news clips sometimes are) by checking the geoblocage list in the API response","No credential workaround exists — the check is IP-based, not account-based"],"exampleFix":"# before\nyoutube_dl 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html'\n# ERROR: The video is not available from your location\n\n# after\nyoutube_dl --proxy 'socks5://fr-proxy.example.com:1080' 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html'","handlingStrategy":"fallback","validationCode":"# Pre-check region before extraction\nimport json, urllib.request\ngeo = json.load(urllib.request.urlopen('http://geo.francetv.fr/ws/edgescape.json'))\ncountry = geo['reponse']['geo_info']['country_code']\nif country not in get_geoblocage_list(video_id):\n    use_french_proxy()  # avoid guaranteed geo failure","typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'not available from your location' in str(e):\n        rerun_with_french_proxy(url)","preventionTips":["Configure a French exit proxy for all FranceTV jobs","Cache geoblocage whitelists per video to avoid repeat geo lookups"],"tags":["francetv","extractor","geo-restriction"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}