首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

python爬取主播信息

执行的时候报错 Traceback (most recent call last): File "e:/personal/vscode/pameinv.py", line 9, in <module> print(a()) File "e:/personal/vscode/pameinv.py", line 8, in a return html.json() File "D:\python\Python37\lib\site-packages\requests\models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "D:\python\Python37\lib\json__init__.py", line 348, in loads return _default_decoder.decode(s) File "D:\python\Python37\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\python\Python37\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 于是开始各种调试 最后换了一个地址行了,可能是微博的api不让调用了 于是修改了一下程序

01
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Python和sendfile[通俗易懂]

    sendfile(2) is a UNIX system call which provides a “zero-copy” way of copying data from one file descriptor (a file) to another (a socket). Because this copying is done entirely within the kernel, sendfile(2) is more efficient than the combination of “file.read()” and “socket.send()”, which requires transferring data to and from user space. This copying of the data twice imposes some performance and resource penalties which sendfile(2) syscall avoids; it also results in a single system call (and thus only one context switch), rather than the series of read(2) / write(2) system calls (each system call requiring a context switch) used internally for the data copying. A more exhaustive explanation of how sendfile(2) works is available here, but long story short is that sending a file with sendfile() is usually twice as fast than using plain socket.send(). Typical applications which can benefit from using sendfile() are FTP and HTTP servers.

    01
    领券