Closed stream request after reading Content-Length
This commit is contained in:
parent
79c5157e05
commit
fecb3ea7c2
1
main.py
1
main.py
|
@ -68,6 +68,7 @@ while not urls.empty():
|
||||||
log.info("Fetching '%s'..."%url)
|
log.info("Fetching '%s'..."%url)
|
||||||
try:
|
try:
|
||||||
r = session.get(url, stream=True, timeout=5)
|
r = session.get(url, stream=True, timeout=5)
|
||||||
|
r.close()
|
||||||
|
|
||||||
# Read response
|
# Read response
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
|
|
Loading…
Reference in New Issue