Closed satyamtg closed 4 years ago
Pushed some modifications:
Let me know if this is OK
Pushed some modifications:
- renamed the map variable as we never use words concatenated this way.
- also added es-419. Both were taken care of back in the days and were dropped when we switched to scraperlib…
- removed the mapping of the user specified language. We already expressed what we expect in entrypoint. There is no reason for user to specify a youtube-specific code there and should he do that, it will fail early.
- removed the function altogether as this is just getting from a dict
- revamped the subtitle name formatting code so it's clearer and adjusted to match Youtube.com
Let me know if this is OK
Yup. These actually seem to be better. I wonder why I didn't think of doing it with dict.get() instead of a function.
This fixes #112 and has some other subtitle related fixes as follows -
iw
is not iso-639-1 code. The correct code ishe
. See https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#HE<native name> - <english name>
-get_subtitles()
now returns only code and display names as a list of dictionaries.