within the code snipped bellow i am simpely trying to return the channel_id strange think is with some youtube channels i dont get the error with with the smaller once i am
take for example the following channels
https://www.youtube.com/@Blazedrust {big channel so no issue}
https://www.youtube.com/@daveyswerkplaats {random guy issue}
even sam sullek gives me the same issue lol
def checkID(self, channel_url_or_name: str) -> str: try: print(channel_url_or_name) return Channel(channel_url_or_name).channel_id
log messages :
------ daveyswerkplaats https://www.youtube.com/c/daveyswerkplaats Exception in thread Thread-1 (checkingFeed): Traceback (most recent call last): File "C:UserskeizeAppDataLocalProgramsPythonPython310libthreading.py", line 1016, in _bootstrap_inner self.run() File "C:UserskeizeAppDataLocalProgramsPythonPython310libthreading.py", line 953, in run self._target(*self._args, **self._kwargs) File "E:projectsMoederjager_botcogsyoutube_checker.py", line 63, in checkingFeed hiddenId = self.getChannelId(youtube_channel_id) File "E:projectsMoederjager_botcogsyoutube_checker.py", line 40, in getChannelId return self.checkID(channel_url_or_name) File "E:projectsMoederjager_botcogsyoutube_checker.py", line 31, in checkID return Channel(channel_url_or_name).channel_id File "C:UserskeizeAppDataLocalProgramsPythonPython310libsite-packagespytubecontribchannel.py", line 58, in channel_id print(self.initial_data['metadata']['channelMetadataRenderer']['externalId']) File "C:UserskeizeAppDataLocalProgramsPythonPython310libsite-packagespytubecontribplaylist.py", line 81, in initial_data self._initial_data = extract.initial_data(self.html) File "C:UserskeizeAppDataLocalProgramsPythonPython310libsite-packagespytubecontribchannel.py", line 79, in html self._html = request.get(self.videos_url) File "C:UserskeizeAppDataLocalProgramsPythonPython310libsite-packagespytuberequest.py", line 53, in get response = _execute_request(url, headers=extra_headers, timeout=timeout) File "C:UserskeizeAppDataLocalProgramsPythonPython310libsite-packagespytuberequest.py", line 37, in _execute_request return urlopen(request, timeout=timeout) # nosec File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 216, in urlopen return opener.open(url, data, timeout) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 525, in open response = meth(req, response) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 634, in http_response response = self.parent.error( File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 557, in error result = self._call_chain(*args) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 496, in _call_chain result = func(*args) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 525, in open response = meth(req, response) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 634, in http_response response = self.parent.error( File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 557, in error result = self._call_chain(*args) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 496, in _call_chain result = func(*args) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 525, in open response = meth(req, response) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 634, in http_response response = self.parent.error( File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 563, in error return self._call_chain(*args) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 496, in _call_chain result = func(*args) File "C:UserskeizeAppDataLocalProgramsPythonPython310liburllibrequest.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
I wanted to recieve the same channel id type return as i had for blazed rust