Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
aal
studsoiger
Commits
b6e9666c
Commit
b6e9666c
authored
Oct 29, 2017
by
Kiste
Browse files
Fix slash in course title
parent
8c886f89
Changes
1
Hide whitespace changes
Inline
Side-by-side
studsauger/logik.py
View file @
b6e9666c
...
@@ -62,11 +62,11 @@ def holsemester(path, session, blacklist, timestamp, cursemester):
...
@@ -62,11 +62,11 @@ def holsemester(path, session, blacklist, timestamp, cursemester):
def
holdatei
(
path
,
session
,
course
,
document
):
def
holdatei
(
path
,
session
,
course
,
document
):
target
=
path
+
'/'
+
course
[
'title'
]
+
'/'
+
document
[
'filename'
]
target
=
path
+
'/'
+
course
[
'title'
]
.
replace
(
'/'
,
''
)
+
'/'
+
document
[
'filename'
]
download
=
session
.
get
(
BASEURL
+
'/documents/'
+
document
[
'document_id'
]
+
'/download'
,
stream
=
True
)
download
=
session
.
get
(
BASEURL
+
'/documents/'
+
document
[
'document_id'
]
+
'/download'
,
stream
=
True
)
if
download
.
status_code
==
200
:
if
download
.
status_code
==
200
:
print
(
path
+
'/'
+
course
[
'title'
]
+
'/'
+
document
[
'filename'
])
print
(
path
+
'/'
+
course
[
'title'
]
.
replace
(
'/'
,
''
)
+
'/'
+
document
[
'filename'
])
with
open
(
target
,
'wb'
)
as
file
:
with
open
(
target
,
'wb'
)
as
file
:
download
.
raw
.
decode_content
=
True
download
.
raw
.
decode_content
=
True
shutil
.
copyfileobj
(
download
.
raw
,
file
)
shutil
.
copyfileobj
(
download
.
raw
,
file
)
Write
Preview
Supports
Markdown
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