How to write the mongodb in scrapy in python after it is removed and downloaded?

def process_item (self, item, spider):

    url = item["file_url"]
    name = item["name"]

    result = self.post.aggregate(
        [
            {"$group": {"_id": {"url": url, "name": name}}}
        ]
    )
    if result:
        pass
    else:

        self.post.insert({"url": url, "name": name})
        return item

def file_path(self, request, response=None, info=None):
    return request.meta.get("filename", "")

def get_media_requests(self, item, info):
    file_url = item["file_url"]
    meta = {"filename": item["name"]}
    yield Request(url=file_url, meta=meta)
    

here I inherit a pipeline and use the key combination to determine whether to repeat it and then download it, otherwise I won"t download it. How to write this?

Jul.23,2021
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-1b3bac5-2c2ab.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-1b3bac5-2c2ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?