feat: TNL-9460 TEXT_API -> TRANSCRIPTS

TEXT_API should have been deleted in this commit, but wasn't. Attended to in a later commit.
This commit is contained in:
Bernard Szabo
2022-11-30 09:57:59 -05:00
parent 9efa820cef
commit 68f8093605
3 changed files with 11 additions and 2 deletions

View File

@@ -1516,7 +1516,7 @@ YOUTUBE = {
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos',
# Current youtube api for requesting transcripts.
# Deprecated youtube api for requesting transcripts.
# For example: http://video.google.com/timedtext?lang=en&v=j_jEn79vS3g.
'TEXT_API': {
'url': 'video.google.com/timedtext',
@@ -1526,6 +1526,7 @@ YOUTUBE = {
},
},
# Current web page mechanism for scraping transcript information from youtube video pages
'TRANSCRIPTS': {
'CAPTION_TRACKS_REGEX': r"captionTracks\"\:\[(?P<caption_tracks>[^\]]+)",
'YOUTUBE_URL_BASE': 'https://www.youtube.com/watch?v=',

View File

@@ -2906,7 +2906,7 @@ YOUTUBE = {
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos/',
# Current youtube api for requesting transcripts.
# Deprecated youtube api for requesting transcripts.
# For example: http://video.google.com/timedtext?lang=en&v=j_jEn79vS3g.
'TEXT_API': {
'url': 'video.google.com/timedtext',
@@ -2916,6 +2916,7 @@ YOUTUBE = {
},
},
# Current web page mechanism for scraping transcript information from youtube video pages
'TRANSCRIPTS': {
'CAPTION_TRACKS_REGEX': r"captionTracks\"\:\[(?P<caption_tracks>[^\]]+)",
'YOUTUBE_URL_BASE': 'https://www.youtube.com/watch?v=',

View File

@@ -916,6 +916,12 @@ class VideoBlockStudentViewDataTestCase(unittest.TestCase):
'v': 'set_youtube_id_of_11_symbols_here',
},
},
# Current web page mechanism for scraping transcript information from youtube video pages
'TRANSCRIPTS': {
'CAPTION_TRACKS_REGEX': r"captionTracks\"\:\[(?P<caption_tracks>[^\]]+)",
'YOUTUBE_URL_BASE': 'https://www.youtube.com/watch?v=',
}
})
@patch.object(settings, 'CONTENTSTORE', create=True, new={
'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore',
@@ -1007,6 +1013,7 @@ class VideoBlockIndexingTestCase(unittest.TestCase):
start_time="00:00:01"
download_video="false"
end_time="00:01:00">
end_time="00:01:00">
<source src="http://www.example.com/source.mp4"/>
<track src="http://www.example.com/track"/>
<handout src="http://www.example.com/handout"/>