code: def item_enclosure_url(self, item):
          
          try:
              url = item.image.url
          except (AttributeError, ValueError):
              img = BeautifulSoup(item.html_content, 'html.parser').find('img')
              url = img.get('src') if img else None
          self.cached_enclosure_url = url
          if url:
              url = urljoin(self.site_url, url)
              if self.feed_format == 'rss':
                  url = url.replace('https://', 'http://')
          return url
docs: Return an image for enclosure.