Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
soundofspace committed Apr 2, 2024
1 parent 1e511e3 commit 3149914
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scrapy/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pprint
import signal
import warnings
from typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Set, Type, Union, cast, TypeVar
from typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Set, Type, Union, cast, TypeVar, Generic

from twisted.internet.defer import (
Deferred,
Expand Down Expand Up @@ -145,6 +145,10 @@ def _apply_settings(self) -> None:
"Overridden settings:\n%(settings)s", {"settings": pprint.pformat(d)}
)

def labels(self, *args, **kwargs):
spider_labels = self.spider.labels(*args, **kwargs) if self.spider else {}
return {**spider_labels}

@inlineCallbacks
def crawl(self, *args: Any, **kwargs: Any) -> Generator[Deferred, Any, None]:
if self.crawling:
Expand Down

0 comments on commit 3149914

Please sign in to comment.