apify 2.0.1b9__py3-none-any.whl → 2.0.1b11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of apify might be problematic. Click here for more details.

apify/_configuration.py CHANGED
@@ -251,6 +251,7 @@ class Configuration(CrawleeConfiguration):
251
251
  ),
252
252
  description='Date when the Actor will time out',
253
253
  ),
254
+ BeforeValidator(lambda val: val if val != '' else None), # We should accept empty environment variables as well
254
255
  ] = None
255
256
 
256
257
  standby_port: Annotated[
apify/_utils.py CHANGED
@@ -11,6 +11,7 @@ def get_system_info() -> dict:
11
11
  system_info: dict[str, str | bool] = {
12
12
  'apify_sdk_version': metadata.version('apify'),
13
13
  'apify_client_version': metadata.version('apify-client'),
14
+ 'crawlee_version': metadata.version('crawlee'),
14
15
  'python_version': python_version,
15
16
  'os': sys.platform,
16
17
  }
@@ -27,7 +27,7 @@ class ApifyHttpProxyMiddleware:
27
27
  proxy_settings = {'useApifyProxy': true, 'apifyProxyGroups': []}
28
28
  """
29
29
 
30
- def __init__(self: ApifyHttpProxyMiddleware, proxy_settings: dict) -> None:
30
+ def __init__(self, proxy_settings: dict) -> None:
31
31
  """Create a new instance.
32
32
 
33
33
  Args:
@@ -66,7 +66,7 @@ class ApifyHttpProxyMiddleware:
66
66
 
67
67
  return cls(proxy_settings)
68
68
 
69
- async def process_request(self: ApifyHttpProxyMiddleware, request: Request, spider: Spider) -> None:
69
+ async def process_request(self, request: Request, spider: Spider) -> None:
70
70
  """Process a Scrapy request by assigning a new proxy.
71
71
 
72
72
  Args:
@@ -89,7 +89,7 @@ class ApifyHttpProxyMiddleware:
89
89
  Actor.log.debug(f'ApifyHttpProxyMiddleware.process_request: updated request.meta={request.meta}')
90
90
 
91
91
  def process_exception(
92
- self: ApifyHttpProxyMiddleware,
92
+ self,
93
93
  request: Request,
94
94
  exception: Exception,
95
95
  spider: Spider,
@@ -116,7 +116,7 @@ class ApifyHttpProxyMiddleware:
116
116
  'reason="{exception}", skipping...'
117
117
  )
118
118
 
119
- async def _get_new_proxy_url(self: ApifyHttpProxyMiddleware) -> ParseResult:
119
+ async def _get_new_proxy_url(self) -> ParseResult:
120
120
  """Get a new proxy URL.
121
121
 
122
122
  Raises:
@@ -19,7 +19,7 @@ class ActorDatasetPushPipeline:
19
19
  """
20
20
 
21
21
  async def process_item(
22
- self: ActorDatasetPushPipeline,
22
+ self,
23
23
  item: Item,
24
24
  spider: Spider,
25
25
  ) -> Item:
apify/scrapy/scheduler.py CHANGED
@@ -29,7 +29,7 @@ class ApifyScheduler(BaseScheduler):
29
29
  This scheduler requires the asyncio Twisted reactor to be installed.
30
30
  """
31
31
 
32
- def __init__(self: ApifyScheduler) -> None:
32
+ def __init__(self) -> None:
33
33
  """Create a new instance."""
34
34
  if not is_asyncio_reactor_installed():
35
35
  raise ValueError(
@@ -40,7 +40,7 @@ class ApifyScheduler(BaseScheduler):
40
40
  self._rq: RequestQueue | None = None
41
41
  self.spider: Spider | None = None
42
42
 
43
- def open(self: ApifyScheduler, spider: Spider) -> None: # this has to be named "open"
43
+ def open(self, spider: Spider) -> None: # this has to be named "open"
44
44
  """Open the scheduler.
45
45
 
46
46
  Args:
@@ -58,7 +58,7 @@ class ApifyScheduler(BaseScheduler):
58
58
  traceback.print_exc()
59
59
  raise
60
60
 
61
- def has_pending_requests(self: ApifyScheduler) -> bool:
61
+ def has_pending_requests(self) -> bool:
62
62
  """Check if the scheduler has any pending requests.
63
63
 
64
64
  Returns:
@@ -75,7 +75,7 @@ class ApifyScheduler(BaseScheduler):
75
75
 
76
76
  return not is_finished
77
77
 
78
- def enqueue_request(self: ApifyScheduler, request: Request) -> bool:
78
+ def enqueue_request(self, request: Request) -> bool:
79
79
  """Add a request to the scheduler.
80
80
 
81
81
  This could be called from either from a spider or a downloader middleware (e.g. redirect, retry, ...).
@@ -111,7 +111,7 @@ class ApifyScheduler(BaseScheduler):
111
111
  Actor.log.debug(f'[{call_id}]: rq.add_request.result={result}...')
112
112
  return bool(result.was_already_present)
113
113
 
114
- def next_request(self: ApifyScheduler) -> Request | None:
114
+ def next_request(self) -> Request | None:
115
115
  """Fetch the next request from the scheduler.
116
116
 
117
117
  Returns:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apify
3
- Version: 2.0.1b9
3
+ Version: 2.0.1b11
4
4
  Summary: Apify SDK for Python
5
5
  License: Apache-2.0
6
6
  Keywords: apify,sdk,automation,chrome,crawlee,crawler,headless,scraper,scraping
@@ -21,7 +21,7 @@ Classifier: Topic :: Software Development :: Libraries
21
21
  Provides-Extra: scrapy
22
22
  Requires-Dist: apify-client (>=1.8.1)
23
23
  Requires-Dist: apify-shared (>=1.1.2)
24
- Requires-Dist: crawlee (>=0.3.8)
24
+ Requires-Dist: crawlee (>=0.3.9)
25
25
  Requires-Dist: cryptography (>=42.0.0)
26
26
  Requires-Dist: httpx (>=0.27.0)
27
27
  Requires-Dist: lazy-object-proxy (>=1.10.0)
@@ -1,12 +1,12 @@
1
1
  apify/__init__.py,sha256=ikoi2EpDYl6y-XSVtlU8UsdQdMEyOiIJCRRAaZFDOP8,550
2
2
  apify/_actor.py,sha256=oPgQ3rxxIEzVcZ9XtI3lf1a_6gwIMgxihNuYGjJpGww,41816
3
- apify/_configuration.py,sha256=fK-BmsdctMJJT93SsupG98_DmknPnfifmIp5pwehYlA,9508
3
+ apify/_configuration.py,sha256=n67sK9g8llsG8ZqIWhi1BEHliplGs5PTB6Ig7_0PaMU,9629
4
4
  apify/_consts.py,sha256=_Xq4hOfOA1iZ3n1P967YWdyncKivpbX6RTlp_qanUoE,330
5
5
  apify/_crypto.py,sha256=e0_aM3l9_5Osk-jszYOOjrAKK60OggSHbiw5c30QnsU,5638
6
6
  apify/_models.py,sha256=oYlTEr-DyQAE-V2rrYD5PhUxTXVPdAig7QV-u6CJw3E,5571
7
7
  apify/_platform_event_manager.py,sha256=K4cHabbQ7_ex7vkX-c-VhAOp8Efw3HDn5Wp4lfA-qAU,7571
8
8
  apify/_proxy_configuration.py,sha256=2z4VV_NrnIp6pDpgQKlKpcHM2pPyXiOpFedpPWje48A,13087
9
- apify/_utils.py,sha256=x4lnR9RNulySiEQTft-GeQqUcJsRr0k8p0Sv9NTeWFg,638
9
+ apify/_utils.py,sha256=Ghho3Gf11zYN8qhjhAkZRvQ--A9Js36GHB0YSDGUK58,694
10
10
  apify/apify_storage_client/__init__.py,sha256=-UbR68bFsDR6ln8OFs4t50eqcnY36hujO-SeOt-KmcA,114
11
11
  apify/apify_storage_client/_apify_storage_client.py,sha256=xi4OFchxhe-1-sykanH6Zcya4OcBhn2uf7OQ1pV4Ins,2338
12
12
  apify/apify_storage_client/_dataset_client.py,sha256=j9seF2OKvbSMD9R9XF9fpa1vtr_1w4JcRV--WCmvU4E,5501
@@ -20,18 +20,18 @@ apify/log.py,sha256=zIVjrqQ1DNWNQQOAmdmR9oAbf4nJH7CSMB6u4OOUf6I,1448
20
20
  apify/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  apify/scrapy/__init__.py,sha256=qDPV_zTRFaUqoFOyS5g4uBfz-UCkmWYJ82VXQ_3Cw6k,348
22
22
  apify/scrapy/middlewares/__init__.py,sha256=tfW-d3WFWLeNEjL8fTmon6NwgD-OXx1Bw2fBdU-wPy4,114
23
- apify/scrapy/middlewares/apify_proxy.py,sha256=_1WO7NKHxIcPf8mSNjsqANTEsx7ygMTuRQW9fbwKMO8,5837
23
+ apify/scrapy/middlewares/apify_proxy.py,sha256=7zHYe1y-MyU4n8Gmx_gP8-KJY01SqOVuqHYYzRJYnIQ,5733
24
24
  apify/scrapy/middlewares/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  apify/scrapy/pipelines/__init__.py,sha256=GWPeLN_Zwj8vRBWtXW6DaxdB7mvyQ7Jw5Tz1ccgWlZI,119
26
- apify/scrapy/pipelines/actor_dataset_push.py,sha256=QERmmExQOGIKQ70-p-lCj5qyE-c-fnYplEqd4mgaB1Q,953
26
+ apify/scrapy/pipelines/actor_dataset_push.py,sha256=l8ehqoUHh-k3C6bScLXZqHaFDSvrF0aWmGgAn9nz-uQ,927
27
27
  apify/scrapy/pipelines/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  apify/scrapy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  apify/scrapy/requests.py,sha256=F4VNaX2fGqybJKbhcRcz0_m6dXse5LzKll4gtMuTRko,7480
30
- apify/scrapy/scheduler.py,sha256=AAIKY5i1QxkC1mtmix6n3M2eQaOw-d1T56Noue9xToc,6013
30
+ apify/scrapy/scheduler.py,sha256=MdwT2Kpe26hVC78p2s1NG7B5Cd7rfGAthODSyrC5Rz0,5933
31
31
  apify/scrapy/utils.py,sha256=0XdFxi1qlUa6gHXG96e1FU9gW0N5Rsu0sVZklFYfC2U,2884
32
32
  apify/storages/__init__.py,sha256=-9tEYJVabVs_eRVhUehxN58GH0UG8OfuGjGwuDieP2M,122
33
33
  apify/storages/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- apify-2.0.1b9.dist-info/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
35
- apify-2.0.1b9.dist-info/METADATA,sha256=SSP1OMBCsHBcKT6QpmP4ezysVXCKm0hfsaAALpNoERk,8657
36
- apify-2.0.1b9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
37
- apify-2.0.1b9.dist-info/RECORD,,
34
+ apify-2.0.1b11.dist-info/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
35
+ apify-2.0.1b11.dist-info/METADATA,sha256=nQFyVxHc0dEPC5l_GFD--tcqBX-DsTqNn9JJ693Jur0,8658
36
+ apify-2.0.1b11.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
37
+ apify-2.0.1b11.dist-info/RECORD,,