crawlee 1.1.1b12__py3-none-any.whl → 1.1.2b1__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.
- crawlee/crawlers/_abstract_http/_abstract_http_crawler.py +8 -2
- crawlee/crawlers/_playwright/_playwright_crawler.py +6 -3
- crawlee/storage_clients/_sql/_storage_client.py +0 -9
- {crawlee-1.1.1b12.dist-info → crawlee-1.1.2b1.dist-info}/METADATA +3 -3
- {crawlee-1.1.1b12.dist-info → crawlee-1.1.2b1.dist-info}/RECORD +8 -8
- {crawlee-1.1.1b12.dist-info → crawlee-1.1.2b1.dist-info}/WHEEL +0 -0
- {crawlee-1.1.1b12.dist-info → crawlee-1.1.2b1.dist-info}/entry_points.txt +0 -0
- {crawlee-1.1.1b12.dist-info → crawlee-1.1.2b1.dist-info}/licenses/LICENSE +0 -0
|
@@ -167,9 +167,15 @@ class AbstractHttpCrawler(
|
|
|
167
167
|
kwargs.setdefault('strategy', 'same-hostname')
|
|
168
168
|
|
|
169
169
|
links_iterator: Iterator[str] = iter(self._parser.find_links(parsed_content, selector=selector))
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
|
|
171
|
+
# Get base URL from <base> tag if present
|
|
172
|
+
extracted_base_urls = list(self._parser.find_links(parsed_content, 'base[href]'))
|
|
173
|
+
base_url: str = (
|
|
174
|
+
str(extracted_base_urls[0])
|
|
175
|
+
if extracted_base_urls
|
|
176
|
+
else context.request.loaded_url or context.request.url
|
|
172
177
|
)
|
|
178
|
+
links_iterator = to_absolute_url_iterator(base_url, links_iterator, logger=context.log)
|
|
173
179
|
|
|
174
180
|
if robots_txt_file:
|
|
175
181
|
skipped, links_iterator = partition(lambda url: robots_txt_file.is_allowed(url), links_iterator)
|
|
@@ -369,9 +369,12 @@ class PlaywrightCrawler(BasicCrawler[PlaywrightCrawlingContext, StatisticsState]
|
|
|
369
369
|
links_iterator: Iterator[str] = iter(
|
|
370
370
|
[url for element in elements if (url := await element.get_attribute('href')) is not None]
|
|
371
371
|
)
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
)
|
|
372
|
+
|
|
373
|
+
# Get base URL from <base> tag if present
|
|
374
|
+
extracted_base_url = await context.page.evaluate('document.baseURI')
|
|
375
|
+
base_url: str = extracted_base_url or context.request.loaded_url or context.request.url
|
|
376
|
+
|
|
377
|
+
links_iterator = to_absolute_url_iterator(base_url, links_iterator, logger=context.log)
|
|
375
378
|
|
|
376
379
|
if robots_txt_file:
|
|
377
380
|
skipped, links_iterator = partition(lambda url: robots_txt_file.is_allowed(url), links_iterator)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
3
|
import warnings
|
|
5
4
|
from datetime import timedelta
|
|
6
5
|
from pathlib import Path
|
|
@@ -269,14 +268,6 @@ class SqlStorageClient(StorageClient):
|
|
|
269
268
|
'Unsupported database. Supported: sqlite, postgresql. Consider using a different database.'
|
|
270
269
|
)
|
|
271
270
|
|
|
272
|
-
# TODO: https://github.com/apify/crawlee-python/issues/1555
|
|
273
|
-
if 'postgresql' in connection_string and sys.version_info >= (3, 14):
|
|
274
|
-
raise ValueError(
|
|
275
|
-
'SqlStorageClient cannot use PostgreSQL with Python 3.14 '
|
|
276
|
-
'due to asyncpg compatibility limitations. '
|
|
277
|
-
'Please use Python 3.13 or earlier, or switch to SQLite.'
|
|
278
|
-
)
|
|
279
|
-
|
|
280
271
|
self._engine = create_async_engine(
|
|
281
272
|
connection_string,
|
|
282
273
|
future=True,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crawlee
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2b1
|
|
4
4
|
Summary: Crawlee for Python
|
|
5
5
|
Project-URL: Apify Homepage, https://apify.com
|
|
6
6
|
Project-URL: Changelog, https://crawlee.dev/python/docs/changelog
|
|
@@ -247,7 +247,7 @@ Requires-Dist: scikit-learn>=1.6.0; extra == 'adaptive-crawler'
|
|
|
247
247
|
Provides-Extra: all
|
|
248
248
|
Requires-Dist: aiosqlite>=0.21.0; extra == 'all'
|
|
249
249
|
Requires-Dist: apify-fingerprint-datapoints>=0.0.2; extra == 'all'
|
|
250
|
-
Requires-Dist: asyncpg>=0.24.0;
|
|
250
|
+
Requires-Dist: asyncpg>=0.24.0; extra == 'all'
|
|
251
251
|
Requires-Dist: beautifulsoup4[lxml]>=4.12.0; extra == 'all'
|
|
252
252
|
Requires-Dist: browserforge>=1.2.3; extra == 'all'
|
|
253
253
|
Requires-Dist: cookiecutter>=2.6.0; extra == 'all'
|
|
@@ -301,7 +301,7 @@ Requires-Dist: playwright>=1.27.0; extra == 'playwright'
|
|
|
301
301
|
Provides-Extra: redis
|
|
302
302
|
Requires-Dist: redis[hiredis]>=7.0.0; extra == 'redis'
|
|
303
303
|
Provides-Extra: sql-postgres
|
|
304
|
-
Requires-Dist: asyncpg>=0.24.0;
|
|
304
|
+
Requires-Dist: asyncpg>=0.24.0; extra == 'sql-postgres'
|
|
305
305
|
Requires-Dist: sqlalchemy[asyncio]<3.0.0,>=2.0.0; extra == 'sql-postgres'
|
|
306
306
|
Provides-Extra: sql-sqlite
|
|
307
307
|
Requires-Dist: aiosqlite>=0.21.0; extra == 'sql-sqlite'
|
|
@@ -53,7 +53,7 @@ crawlee/crawlers/__init__.py,sha256=9VmFahav3rjE-2Bxa5PAhBgkYXP0k5SSAEpdG2xMZ7c,
|
|
|
53
53
|
crawlee/crawlers/_types.py,sha256=xbGTJQirgz5wUbfr12afMR4q-_5AWP7ngF2e8K5P8l0,355
|
|
54
54
|
crawlee/crawlers/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
crawlee/crawlers/_abstract_http/__init__.py,sha256=QCjn8x7jpo8FwEeSRw10TVj_0La2v9mLEiQWdk2RoTw,273
|
|
56
|
-
crawlee/crawlers/_abstract_http/_abstract_http_crawler.py,sha256=
|
|
56
|
+
crawlee/crawlers/_abstract_http/_abstract_http_crawler.py,sha256=wFErk_Mg02vlgX_jV5GohmZs2qVZt3wy1yBKrU0lbAc,11829
|
|
57
57
|
crawlee/crawlers/_abstract_http/_abstract_http_parser.py,sha256=Y5o_hiW_0mQAte5GFqkUxscwKEFpWrBYRsLKP1cfBwE,3521
|
|
58
58
|
crawlee/crawlers/_abstract_http/_http_crawling_context.py,sha256=Rno_uJ8ivmyRxFQv2MyY_z9B5WPHSEd5MAPz31_1ZIo,2179
|
|
59
59
|
crawlee/crawlers/_abstract_http/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -85,7 +85,7 @@ crawlee/crawlers/_parsel/_parsel_crawling_context.py,sha256=sZB26RcRLjSoD15myEOM
|
|
|
85
85
|
crawlee/crawlers/_parsel/_parsel_parser.py,sha256=yWBfuXUHMriK4DRnyrXTQoGeqX5WV9bOEkBp_g0YCvQ,1540
|
|
86
86
|
crawlee/crawlers/_parsel/_utils.py,sha256=MbRwx-cdjlq1zLzFYf64M3spOGQ6yxum4FvP0sdqA_Q,2693
|
|
87
87
|
crawlee/crawlers/_playwright/__init__.py,sha256=6Cahe6VEF82o8CYiP8Cmp58Cmb6Rb8uMeyy7wnwe5ms,837
|
|
88
|
-
crawlee/crawlers/_playwright/_playwright_crawler.py,sha256=
|
|
88
|
+
crawlee/crawlers/_playwright/_playwright_crawler.py,sha256=2ONpyYRjX31YmgFhx2pVkt-SBXZCS-HawAtsG99fwYc,24324
|
|
89
89
|
crawlee/crawlers/_playwright/_playwright_crawling_context.py,sha256=Oi0tMBXHaEDlFjqG01DzgB7Ck52bjVjz-X__eMioxas,1249
|
|
90
90
|
crawlee/crawlers/_playwright/_playwright_http_client.py,sha256=Nfm69dqX85k68jN1p3ljZWbn8egqDWPIPRykXyXsoQs,3977
|
|
91
91
|
crawlee/crawlers/_playwright/_playwright_pre_nav_crawling_context.py,sha256=fEI2laWhmJdWiGoMF5JBLBsim9NtENfagZt6FFd2Rgo,1387
|
|
@@ -189,7 +189,7 @@ crawlee/storage_clients/_sql/_dataset_client.py,sha256=tiJVvOPZgc7cy4kGfWnun-g2T
|
|
|
189
189
|
crawlee/storage_clients/_sql/_db_models.py,sha256=KzA-R_L6zv9gqQg7B27mF-fERNJuMUEnewV9iofmTnI,9812
|
|
190
190
|
crawlee/storage_clients/_sql/_key_value_store_client.py,sha256=LnVLWhOjo4LdvtCac4fwuf__DgEQjlqSxz8KkjY3Qx4,11311
|
|
191
191
|
crawlee/storage_clients/_sql/_request_queue_client.py,sha256=OlvAOwEoYY5f4NO7BdhLFRT_i_E3YzJDb_ptKKK2huY,29478
|
|
192
|
-
crawlee/storage_clients/_sql/_storage_client.py,sha256=
|
|
192
|
+
crawlee/storage_clients/_sql/_storage_client.py,sha256=ITtMpwfotIW4SZjO4rycB5wfMKaqTAJgMvzcUZxckrk,10905
|
|
193
193
|
crawlee/storage_clients/_sql/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
194
194
|
crawlee/storages/__init__.py,sha256=wc2eioyCKAAYrg4N7cshpjC-UbE23OzGar9nK_kteSY,186
|
|
195
195
|
crawlee/storages/_base.py,sha256=zUOcMJTg8MAzq-m9X1NJcWncCfxzI5mb5MyY35WAkMk,2310
|
|
@@ -199,8 +199,8 @@ crawlee/storages/_request_queue.py,sha256=bjBOGbpMaGUsqJPVB-JD2VShziPAYMI-GvWKKp
|
|
|
199
199
|
crawlee/storages/_storage_instance_manager.py,sha256=72n0YlPwNpSQDJSPf4TxnI2GvIK6L-ZiTmHRbFcoVU0,8164
|
|
200
200
|
crawlee/storages/_utils.py,sha256=Yz-5tEBYKYCFJemYT29--uGJqoJLApLDLgPcsnbifRw,439
|
|
201
201
|
crawlee/storages/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
202
|
-
crawlee-1.1.
|
|
203
|
-
crawlee-1.1.
|
|
204
|
-
crawlee-1.1.
|
|
205
|
-
crawlee-1.1.
|
|
206
|
-
crawlee-1.1.
|
|
202
|
+
crawlee-1.1.2b1.dist-info/METADATA,sha256=VcyGEp0Jf5SfylsXe_2tpxo5dH8_wRM9eqUqgynRRJk,29472
|
|
203
|
+
crawlee-1.1.2b1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
204
|
+
crawlee-1.1.2b1.dist-info/entry_points.txt,sha256=1p65X3dA-cYvzjtlxLL6Kn1wpY-3uEDVqJLp53uNPeo,45
|
|
205
|
+
crawlee-1.1.2b1.dist-info/licenses/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
|
|
206
|
+
crawlee-1.1.2b1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|