Skip to content

Commit

Permalink
Fix Python 9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Jan 8, 2025
1 parent dfb4df0 commit e39828e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zyte_spider_templates/spiders/ecommerce.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def robotstxt_requests(self) -> Iterable[scrapy.Request]:
)

def get_sitemap_request(
self, url: str, likely_leaf_type: str | None = None
self, url: str, likely_leaf_type: Optional[str] = None
) -> scrapy.Request:
return scrapy.Request(
url=url,
Expand All @@ -458,7 +458,7 @@ def parse_robotstxt(self, response) -> Iterable[scrapy.Request]:
yield self.get_sitemap_request(url)

def parse_sitemap(
self, response, likely_leaf_type: str | None = None
self, response, likely_leaf_type: Optional[str] = None
) -> Iterable[scrapy.Request]:
if not likely_leaf_type and _is_product_sitemap(response.url):
likely_leaf_type = "product"
Expand Down

0 comments on commit e39828e

Please sign in to comment.