Closed xenova closed 2 years ago
Another (somewhat similar) error occurs for the X2agMBdnv3c:
from youtube_transcript_api import YouTubeTranscriptApi
YouTubeTranscriptApi.get_transcript('X2agMBdnv3c')
which has the following error:
File "<ipython-input-10-011ad7250ddf>", line 4, in <module>
YouTubeTranscriptApi.get_transcript('X2agMBdnv3c')
File "/usr/local/lib/python3.7/dist-packages/youtube_transcript_api/_api.py", line 128, in get_transcript
return cls.list_transcripts(video_id, proxies, cookies).find_transcript(languages).fetch()
File "/usr/local/lib/python3.7/dist-packages/youtube_transcript_api/_transcripts.py", line 292, in fetch
_raise_http_errors(response, self.video_id).text,
File "/usr/local/lib/python3.7/dist-packages/youtube_transcript_api/_transcripts.py", line 334, in parse
for xml_element in ElementTree.fromstring(plain_data)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1316, in XML
return parser.close()
File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Hi @xenova, thank you for reporting this and sorry for the late reply I've been really busy lately 🙈 I just opened a PR to fix this issue (#149) and will release it as v0.4.4!
Thanks! 😄 No worries.
The fix has been released as of v0.4.4! 👍
For some reason, I am unable to extract transcripts for https://www.youtube.com/watch?v=BaxBFnIUTrc
This outputs:
I am running the latest version (youtube-transcript-api-0.4.3) and it fails on both windows and linux.