Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: request() got an unexpected keyword argument 'stream' #15

Open
CharlieCho2017 opened this issue Aug 22, 2023 · 2 comments
Open

Comments

@CharlieCho2017
Copy link

curl_cffi如何实现requests那样返回流呢?

@wwwzhouhui
Copy link
Owner

这个实现不了,因为我翻过curl_cffi代码入参没有stream属性。 原生request是有点,不过官方目前做了限制目前先靠curl_cffi模拟浏览器方式绕过官方限制实现访问。如果你有兴趣可以改写curl_cffi 增加stream属性

@perklet
Copy link

perklet commented Aug 25, 2023

限于 libcurl 的 API,很难实现 stream。不过可以使用回调,有个 content_callback 参数你试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants