How does item in python pass a list?

def get_info(self, response):
    item = baidu_item()
    item["id"]=response.meta["id"]
    item["name"]=response.meta["name"]
    redirect_url_list = response.xpath("""//h3/a/@href""").extract()
    for url in redirect_url_list:
        if "http" in url or "https" in url:
            scrapy.Request(url=url, headers=self.headers, timeout=5,meta={"item":item})

def parse(self, response):
    item=response.meta["item"]
    if self.filter_domain(response.url) == 0:
        if len(re.findall("/", response.url)) <= 3:
            if self.filter_figure(response.url):
                if re.findall("[^/]+(?!.*/)", response.url):
                    if self.filter_figure(response.url):

                        item["url"]=[response.url]

now the situation is that I write a url rule when I loop, but if I can only pass one url, at a time according to item ["url"] = [response.url], how do I now pass the looped url to item [" url"]?

Oct.27,2021

just use a recursive function
something like this

def fact(n):
    if n==1:
        return 1
    return n * fact(n - 1)

of course, you can also use while to judge

while :
    

item['url']=[]
item['url'].append(response.url)
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-1b3b226-2c266.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-1b3b226-2c266.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?