-
Notifications
You must be signed in to change notification settings - Fork 519
Closed
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.
Description
Getting this error when using ParselCrawler.
ValueError: Cannot use css on a Selector of type 'json'
Reproduce:
main.py
import asyncio
from crawlee.parsel_crawler import ParselCrawler
from crawler.routes import router
async def main() -> None:
"""The crawler entry point."""
crawler = ParselCrawler(
request_handler=router,
max_requests_per_crawl=50,
)
await crawler.run(
[
'https://httpbin.org/ip',
]
)
if __name__ == '__main__':
asyncio.run(main())routes.py
from crawlee.parsel_crawler import ParselCrawlingContext
from crawlee.router import Router
router = Router[ParselCrawlingContext]()
@router.default_handler
async def default_handler(context: ParselCrawlingContext) -> None:
"""Default request handler."""
print("hello")Metadata
Metadata
Assignees
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.