Changed Url module timeout and maxsize to get youtube working again
This commit is contained in:
parent
39c1b98f88
commit
3cbcbc06c3
|
@ -122,7 +122,7 @@ class MatrixModule(BotModule):
|
||||||
title = None
|
title = None
|
||||||
description = None
|
description = None
|
||||||
# timeout will still handle network timeouts
|
# timeout will still handle network timeouts
|
||||||
timeout = httpx.Timeout(10.0, connect=2.0, read=5.0)
|
timeout = httpx.Timeout(10.0)
|
||||||
responsetext = "" # read our response here
|
responsetext = "" # read our response here
|
||||||
try:
|
try:
|
||||||
self.logger.debug(f"start streaming {url}")
|
self.logger.debug(f"start streaming {url}")
|
||||||
|
@ -130,7 +130,7 @@ class MatrixModule(BotModule):
|
||||||
# as we are using stream the r.text wont be available, save our read data ourself
|
# as we are using stream the r.text wont be available, save our read data ourself
|
||||||
|
|
||||||
# maximum size to read of the response in characters (this prevents us from reading stream forever)
|
# maximum size to read of the response in characters (this prevents us from reading stream forever)
|
||||||
maxsize = 100000
|
maxsize = 800000
|
||||||
with httpx.stream("GET", url, timeout=timeout) as r:
|
with httpx.stream("GET", url, timeout=timeout) as r:
|
||||||
for part in r.iter_text():
|
for part in r.iter_text():
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
|
|
Loading…
Reference in New Issue