How to block or download a pdf #1783
Unanswered
danielvanmilgx
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
as for JS there is: https://crawlee.dev/js/docs/examples/file-download |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @danielvanmilgx, could you please provide a minimal code snippet that shows the error and/or desired functionality? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Are there working examples of blocking or downloading a pdf with Playwright crawler?
I keep getting errors like:
Traceback (most recent call last):
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\crawlee\crawlers_basic_context_pipeline.py", line 100, in call
result = await middleware_instance.action()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\crawlee\crawlers_basic_context_pipeline.py", line 40, in action
self.output_context = await self.generator.anext()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\crawlee\crawlers_playwright_playwright_crawler.py", line 320, in _navigate
response = await context.page.goto(
^^^^^^^^^^^^^^^^^^^^^^^^
context.request.url, timeout=remaining_timeout.total_seconds() * 1000, **context.goto_options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\playwright\async_api_generated.py", line 9045, in goto
await self._impl_obj.goto(
url=url, timeout=timeout, waitUntil=wait_until, referer=referer
)
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\playwright_impl_page.py", line 552, in goto
return await self._main_frame.goto(**locals_to_params(locals()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\playwright_impl_frame.py", line 153, in goto
await self._channel.send(
"goto", self._navigation_timeout, locals_to_params(locals())
)
File "c:\danielm\git\gitlab\services\subsidiegezocht.venv\Lib\site-packages\playwright_impl_connection.py", line 69, in send
return await self._connection.wrap_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
Beta Was this translation helpful? Give feedback.
All reactions