Python code here

 def process_response(self, request, response, spider):
        if response.headers.get("Transfer-Encoding") == "chunked":
            body = decode_chunked_transfer(response.body)
            return response.replace(body=body)
        return response

what does this mean by response.replace (body=body) here? Body=body, what is this?

Jan.20,2022

body is the parameter in the replace function called body , and the body after = body is the variable body

in your function. < hr >

for example, I have a function

def test(a=1, b=2):
    print(a,b)
    
 test(b=4)

A meaning

for specific implementation, you can ctrl+ the left button Click on the function and see the function prototype


take a look at the specific implementation of the source code to get a general idea.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e495b4-592b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e495b4-592b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?