Send a get request to the application of the url, print the information returned part only accept to return, then the program runs over, the back of the return is not received
Also try to request other web site, if the page content is less can receive complete information, but if the page content or more pages long that is unable to receive complete return information,
I just started to learn language, I am two lines of code is simpler, may not be technical, but the return of this I asked several people with no result, also please the great god can give me some advice, thank you very much
CodePudding user response:
Use iter_content or iter_lines (note that... Too long text could also read is not complete, mainly because of the length of the STR type restrictions... )CodePudding user response:
Should be network problems, you of the network performance and stability?Can increase the timeout to read
CodePudding user response:
Why I like you? The same code!import requests
Url='https://www.runoob.com/w3cnote/python-func-decorators.html'
The response=requests. The get url (url=)
Print (response. The text)
Results: