Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
f7d918e7
Commit
f7d918e7
authored
6 years ago
by
asadazam93
Browse files
Options
Downloads
Patches
Plain Diff
Fixed download txt transcript 500
parent
11e16319
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
+2
-4
2 additions, 4 deletions
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
with
2 additions
and
4 deletions
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
+
2
−
4
View file @
f7d918e7
...
...
@@ -669,7 +669,8 @@ class Transcript(object):
if
output_format
==
'
txt
'
:
text
=
json
.
loads
(
content
)[
'
text
'
]
return
HTMLParser
().
unescape
(
"
\n
"
.
join
(
text
))
text_without_none
=
[
line
if
line
else
''
for
line
in
text
]
return
HTMLParser
().
unescape
(
"
\n
"
.
join
(
text_without_none
))
elif
output_format
==
'
srt
'
:
return
generate_srt_from_sjson
(
json
.
loads
(
content
),
speed
=
1.0
)
...
...
@@ -890,9 +891,6 @@ def get_transcript_from_val(edx_video_id, lang=None, output_format=Transcript.SR
raise
NotFoundError
(
u
'
Transcript not found for {}, lang: {}
'
.
format
(
edx_video_id
,
lang
))
transcript_conversion_props
=
dict
(
transcript
,
output_format
=
output_format
)
# Log for EDUCATOR-3928
if
edx_video_id
==
'
MIT6002XT214-V002700
'
:
log
.
info
(
"
Transcript content: %s
"
,
transcript_conversion_props
.
get
(
'
content
'
,
''
))
transcript
=
convert_video_transcript
(
**
transcript_conversion_props
)
filename
=
transcript
[
'
filename
'
]
content
=
transcript
[
'
content
'
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment