{"record":{"id":"eff33431882fd5ea","repo":"ytdl-org/youtube-dl","slug":"s-use-username-and-password-or-netrc-to-pr","errorCode":null,"errorMessage":"%s. Use --username and --password or --netrc to provide account credentials.","messagePattern":"(.+?)\\. Use --username and --password or --netrc to provide account credentials\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/common.py","lineNumber":1012,"sourceCode":"    def report_extraction(self, id_or_name):\n        \"\"\"Report information extraction.\"\"\"\n        self.to_screen('%s: Extracting information' % id_or_name)\n\n    def report_download_webpage(self, video_id):\n        \"\"\"Report webpage download.\"\"\"\n        self.to_screen('%s: Downloading webpage' % video_id)\n\n    def report_age_confirmation(self):\n        \"\"\"Report attempt to confirm age.\"\"\"\n        self.to_screen('Confirming age')\n\n    def report_login(self):\n        \"\"\"Report attempt to log in.\"\"\"\n        self.to_screen('Logging in')\n\n    @staticmethod\n    def raise_login_required(msg='This video is only available for registered users'):\n        raise ExtractorError(\n            '%s. Use --username and --password or --netrc to provide account credentials.' % msg,\n            expected=True)\n\n    @staticmethod\n    def raise_geo_restricted(msg='This video is not available from your location due to geo restriction', countries=None):\n        raise GeoRestrictedError(msg, countries=countries)\n\n    def raise_no_formats(self, msg, expected=False, video_id=None):\n        if expected and (\n                self.get_param('ignore_no_formats_error') or self.get_param('wait_for_video')):\n            self.report_warning(msg, video_id)\n        elif isinstance(msg, ExtractorError):\n            raise msg\n        else:\n            raise ExtractorError(msg, expected=expected, video_id=video_id)\n\n    # Methods for following #608\n    @staticmethod","sourceCodeStart":994,"sourceCodeEnd":1030,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/common.py#L994-L1030","documentation":"Error \"%s. Use --username and --password or --netrc to provide account credentials.\" thrown in ytdl-org/youtube-dl.","triggerScenarios":"Thrown at youtube_dl/extractor/common.py:1012 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide account credentials with --username and --password, or use a --netrc file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}