From ac5d44805428bd84dde3392ca97bafed795c488c Mon Sep 17 00:00:00 2001 From: Kevin Toms Date: Wed, 17 Jan 2024 10:05:22 -0500 Subject: [PATCH] Add FAQ on making a blank request (#6208) --- docs/faq.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index 657802fd3..7090f0bcd 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -409,6 +409,23 @@ or :class:`~scrapy.signals.headers_received` signals and raising a :ref:`topics-stop-response-download` topic for additional information and examples. +.. _faq-blank-request: + +How can I make a blank request? +------------------------------- + +.. code-block:: python + + from scrapy import Request + + + blank_request = Request("data:,") + +In this case, the URL is set to a data URI scheme. Data URLs allow you to include data +in-line in web pages as if they were external resources. The "data:" scheme with an empty +content (",") essentially creates a request to a data URL without any specific content. + + Running ``runspider`` I get ``error: No spider found in file: `` --------------------------------------------------------------------------