jdepoix / youtube-transcript-api

This is a python API which allows you to get the transcript/subtitles for a given YouTube video. It also works for automatically generated subtitles and it does not require an API key nor a headless browser, like other selenium based solutions do!
MIT License
2.95k stars 333 forks source link

Could not get available persian subtitle #12

Closed hosnas closed 5 years ago

hosnas commented 5 years ago

simply I'm doing the following command in cli youtube_transcript_api LKvjIsyYng8 --languages fa However I cant get the language I want that is available in subtitles.

utkarshdubey commented 5 years ago

That would probably be a problem with the captions. If the caption is not available for a particular language, it can't be fetched along.

On Tue, May 7, 2019 at 1:10 AM hosnas notifications@github.com wrote:

simply I'm doing the following command in cli youtube_transcript_api LKvjIsyYng8 --languages fa However I cant get the language I want.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jdepoix/youtube-transcript-api/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7KQDXCRFQ24DKYUE6LQOTPUCCSRANCNFSM4HLC2JMA .

hosnas commented 5 years ago

@utkarshdubey as I said, the caption is available. But its not being fetched.

utkarshdubey commented 5 years ago

Could you give me more information or the Tracebacks if you received any errors?

On Tue, May 7, 2019 at 6:21 AM hosnas notifications@github.com wrote:

@utkarshdubey https://github.com/utkarshdubey as I said, the caption is available. But its not being fetched.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jdepoix/youtube-transcript-api/issues/12#issuecomment-489863845, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7KQDQ2Y6U4QFKD24D6UD3PUDHAFANCNFSM4HLC2JMA .

hosnas commented 5 years ago

@utkarshdubey the only error I'm getting is this:

ERROR:youtube_transcript_api._api:Could not get the transcript for the video https://www.youtube.com/watch?v=LKvjIsyYng8! Most likely subtitles have been disabled by the uploader or the video is no longer available. {} Although its clearly not correct. cause I can pick fa language from list of subtitles by clicking on persian

jdepoix commented 5 years ago

@hosnas I can not replicate this error.

Running youtube_transcript_api LKvjIsyYng8 --languages fa with the current version (0.1.4) prints the subtitles without errors, using python 2 and 3.

Could you please provide more information on the version of youtube-transcript-api and the version of python you are using?

hosnas commented 5 years ago

@jdepoix very wierd. I changed my location in youtube pannel and was able to get the subtitle.

jdepoix commented 5 years ago

@hosnas so would you consider your problem to be solved, or should we investigate further?

hosnas commented 5 years ago

@jdepoix yes im considering it solved