Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-val
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-val
Commits
064cb036
Commit
064cb036
authored
Jan 31, 2018
by
Tyler Hallada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read video in unicode?
parent
a744c98b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
edxval/api.py
+3
-3
No files found.
edxval/api.py
View file @
064cb036
...
...
@@ -761,8 +761,8 @@ def export_to_xml(video_ids, course_id=None, external=False, video_download_dir=
external (bool): True if first video id in `video_ids` is not edx_video_id else False
video_download_dir (str): The directory to download videos files to. If None, do not
download videos.
resource_fs (
???): The filesystem to download videos onto. If None, do not download
videos.
resource_fs (
PyFilesystem): The filesystem to download videos onto. If None, do not
download
videos.
Returns:
An lxml video_asset element containing export data
...
...
@@ -804,7 +804,7 @@ def export_to_xml(video_ids, course_id=None, external=False, video_download_dir=
exported_url
=
'{}/{}'
.
format
(
video_download_dir
,
video_url
.
split
(
'/'
)[
-
1
])
resp
=
urllib2
.
urlopen
(
video_url
)
with
resource_fs
.
open
(
exported_url
,
'w'
)
as
f
:
f
.
write
(
resp
.
read
(
))
f
.
write
(
unicode
(
resp
.
read
()
))
attributes
[
'url'
]
=
exported_url
else
:
attributes
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment