84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
log.INFO("Content-Length", len(r.content) )
statusmsg and progress_feedback(statusmsg)
if not content:
return r
elif binary:
r = r.content
else:
# Receival is actually happening here
if encoding:
r.encoding = encoding
r = r.text
# clean statusbar
statusmsg and progress_feedback()
return r
#-- Append missing trailing slash to URLs
def fix_url(url):
|
|
>
>
>
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
log.INFO("Content-Length", len(r.content) )
statusmsg and progress_feedback(statusmsg)
if not content:
return r
elif binary:
r = r.content
else:
# Manually decode charset
if encoding:
r.encoding = encoding
r = r.content.decode(encoding, errors='replace')
# See requests isse #2359, automatic charset detection can be awfully slow
else:
r = r.text
# clean statusbar
statusmsg and progress_feedback()
return r
#-- Append missing trailing slash to URLs
def fix_url(url):
|