Skip to content

Commit 3b3f6e5

Browse files
committed
Update docs.zyte.com references
1 parent 055a5a6 commit 3b3f6e5

File tree

10 files changed

+38
-38
lines changed

10 files changed

+38
-38
lines changed

docs/reference/fingerprint-params.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fingerprints for Zyte API requests based on the following Zyte API parameters:
2626
- Output parameters (:http:`request:browserHtml`,
2727
:http:`request:httpResponseBody`, :http:`request:httpResponseHeaders`,
2828
:http:`request:responseCookies`, :http:`request:screenshot`, and
29-
:ref:`automatic extraction outputs <zyte-api-extract-fields>` like
29+
:ref:`automatic extraction outputs <zapi-extract-fields>` like
3030
:http:`request:product`)
3131

3232
- Rendering option parameters (:http:`request:actions`,

docs/reference/request.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ combinations that Zyte API does not currently support, and may never support:
222222
:http:`request:requestHeaders`.
223223

224224
- You can set :http:`request:httpResponseBody` to ``True`` or use
225-
:ref:`automatic extraction from httpResponseBody <zyte-api-extract-from>`,
225+
:ref:`automatic extraction from httpResponseBody <zapi-extract-from>`,
226226
and also set :http:`request:browserHtml` or :http:`request:screenshot` to
227227
``True`` or use :ref:`automatic extraction from browserHtml
228-
<zyte-api-extract-from>`. In this case, :attr:`Request.headers
228+
<zapi-extract-from>`. In this case, :attr:`Request.headers
229229
<scrapy.http.Request.headers>` is mapped both as
230230
:http:`request:customHttpRequestHeaders` and as
231231
:http:`request:requestHeaders`, and :http:`request:browserHtml` is used as

docs/reference/settings.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ Default: ``False``
1515

1616
Enables stats that indicate which requested fields :ref:`obtained through
1717
scrapy-poet integration <scrapy-poet>` come directly from
18-
:ref:`zyte-api-extract`.
18+
:ref:`zapi-extract`.
1919

2020
If for any request no page object class is used to override
21-
:ref:`zyte-api-extract` fields for a given item type, the following stat is
21+
:ref:`zapi-extract` fields for a given item type, the following stat is
2222
set:
2323

2424
.. code-block:: python
@@ -29,7 +29,7 @@ set:
2929
all fields.
3030

3131
If for any request a custom page object class is used to override some
32-
:ref:`zyte-api-extract` fields, the following stat is set:
32+
:ref:`zapi-extract` fields, the following stat is set:
3333

3434
.. code-block:: python
3535
@@ -434,7 +434,7 @@ ZYTE_API_SESSION_MAX_ERRORS
434434
Default: ``1``
435435

436436
Maximum number of :ref:`unsuccessful responses
437-
<zyte-api-unsuccessful-responses>` allowed for any given session before
437+
<zapi-unsuccessful-responses>` allowed for any given session before
438438
discarding the session.
439439

440440
You might want to increase this number if you find that a session may continue

docs/setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Requirements
1616
You need at least:
1717

1818
- A :ref:`Zyte API <zyte-api>` subscription (there’s a :ref:`free trial
19-
<zyte-api-trial>`).
19+
<zapi-trial>`).
2020

2121
- Python 3.8+
2222

docs/usage/manual.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ remember to also request :http:`request:httpResponseHeaders`:
6464
# "<html>…</html>"
6565
6666
To learn more about Zyte API parameters, see the upstream :ref:`usage
67-
<zyte-api-usage>` and :ref:`API reference <zyte-api-reference>` pages.
67+
<zapi-usage>` and :ref:`API reference <zapi-reference>` pages.

docs/usage/retry.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Retries
55
=======
66

7-
To make :ref:`error handling <zyte-api-errors>` easier, scrapy-zyte-api lets
7+
To make :ref:`error handling <zapi-errors>` easier, scrapy-zyte-api lets
88
you :ref:`handle successful Zyte API responses as usual <retry-successful>`,
99
but :ref:`implements a more advanced retry mechanism for rate-limiting and
1010
unsuccessful responses <retry-non-successful>`.
@@ -14,7 +14,7 @@ unsuccessful responses <retry-non-successful>`.
1414
Retrying successful Zyte API responses
1515
======================================
1616

17-
When a :ref:`successful Zyte API response <zyte-api-successful-responses>` is
17+
When a :ref:`successful Zyte API response <zapi-successful-responses>` is
1818
received, a Scrapy response object is built based on the upstream website
1919
response (see :ref:`response`), and passed to your :ref:`downloader middlewares
2020
<topics-downloader-middleware>` and :ref:`spider callback <topics-spiders>`.
@@ -30,8 +30,8 @@ them using Scrapy’s built-in retry middleware
3030
Retrying non-successful Zyte API responses
3131
==========================================
3232

33-
When a :ref:`rate-limiting <zyte-api-rate-limit>` or an :ref:`unsuccessful
34-
<zyte-api-unsuccessful-responses>` Zyte API response is received, no Scrapy
33+
When a :ref:`rate-limiting <zapi-rate-limit>` or an :ref:`unsuccessful
34+
<zapi-unsuccessful-responses>` Zyte API response is received, no Scrapy
3535
response object is built. Instead, a :ref:`retry policy <retry-policy>` is
3636
followed, and if the policy retries are exhausted, a
3737
:class:`zyte_api.RequestError` exception is raised.

docs/usage/session.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Session management
66

77
Zyte API provides powerful session APIs:
88

9-
- :ref:`Client-managed sessions <zyte-api-session-id>` give you full control
9+
- :ref:`Client-managed sessions <zapi-session-id>` give you full control
1010
over session management.
1111

12-
- :ref:`Server-managed sessions <zyte-api-session-contexts>` let Zyte API
12+
- :ref:`Server-managed sessions <zapi-session-contexts>` let Zyte API
1313
handle session management for you.
1414

1515
When using scrapy-zyte-api, you can use these session APIs through the
1616
corresponding Zyte API fields (:http:`request:session`,
1717
:http:`request:sessionContext`).
1818

1919
However, scrapy-zyte-api also provides its own session management API, similar
20-
to that of :ref:`server-managed sessions <zyte-api-session-contexts>`, but
21-
built on top of :ref:`client-managed sessions <zyte-api-session-id>`.
20+
to that of :ref:`server-managed sessions <zapi-session-contexts>`, but
21+
built on top of :ref:`client-managed sessions <zapi-session-id>`.
2222

2323
scrapy-zyte-api session management offers some advantages over
24-
:ref:`server-managed sessions <zyte-api-session-contexts>`:
24+
:ref:`server-managed sessions <zapi-session-contexts>`:
2525

2626
- You can perform :ref:`session validity checks <session-check>`, so that the
2727
sessions of responses that do not pass those checks are refreshed, and the
@@ -35,11 +35,11 @@ scrapy-zyte-api session management offers some advantages over
3535
:ref:`optimize-sessions` and :ref:`session-configs`.
3636

3737
However, scrapy-zyte-api session management is not a replacement for
38-
:ref:`server-managed sessions <zyte-api-session-contexts>` or
39-
:ref:`client-managed sessions <zyte-api-session-id>`:
38+
:ref:`server-managed sessions <zapi-session-contexts>` or
39+
:ref:`client-managed sessions <zapi-session-id>`:
4040

41-
- :ref:`Server-managed sessions <zyte-api-session-contexts>` offer a longer
42-
life time than the :ref:`client-managed sessions <zyte-api-session-id>`
41+
- :ref:`Server-managed sessions <zapi-session-contexts>` offer a longer
42+
life time than the :ref:`client-managed sessions <zapi-session-id>`
4343
that scrapy-zyte-api session management uses, so as long as you do not need
4444
one of the scrapy-zyte-api session management features, server-managed
4545
sessions can be significantly more efficient (fewer total sessions needed
@@ -49,7 +49,7 @@ However, scrapy-zyte-api session management is not a replacement for
4949
website. With scrapy-zyte-api session management, you need to :ref:`handle
5050
optimization yourself <optimize-sessions>`.
5151

52-
- :ref:`Client-managed sessions <zyte-api-session-id>` offer full control
52+
- :ref:`Client-managed sessions <zapi-session-id>` offer full control
5353
over session management, while scrapy-zyte-api session management removes
5454
some of that control to provide an easier API for supported use cases.
5555

@@ -68,7 +68,7 @@ override <session-configs>`.
6868
.. _session-init-default:
6969

7070
By default, scrapy-zyte-api will maintain up to 8 sessions per domain, each
71-
initialized with a :ref:`browser request <zyte-api-browser>` targeting the URL
71+
initialized with a :ref:`browser request <zapi-browser>` targeting the URL
7272
of the first request that will use the session. Sessions are automatically
7373
rotated among requests, and refreshed as they expire or get banned. You can
7474
customize most of this logic though request metadata, settings and
@@ -134,7 +134,7 @@ To change the :ref:`default session initialization parameters
134134
:reqmeta:`zyte_api_session_params` request metadata key.
135135

136136
It works similarly to :http:`request:sessionContextParams` from
137-
:ref:`server-managed sessions <zyte-api-session-contexts>`, but it supports
137+
:ref:`server-managed sessions <zapi-session-contexts>`, but it supports
138138
arbitrary Zyte API parameters instead of a specific subset.
139139

140140
If it does not define a ``"url"``, the URL of the request :ref:`triggering
@@ -210,7 +210,7 @@ initialization request.
210210
If your session checking implementation relies on the response body (e.g. it
211211
uses CSS or XPath expressions), you should make sure that you are getting one,
212212
which might not be the case if you are mostly using :ref:`Zyte API automatic
213-
extraction <zyte-api-extract>`, e.g. when using :doc:`Zyte spider templates
213+
extraction <zapi-extract>`, e.g. when using :doc:`Zyte spider templates
214214
<zyte-spider-templates:index>`. For example, you can use
215215
:setting:`ZYTE_API_AUTOMAP_PARAMS` and :setting:`ZYTE_API_PROVIDER_PARAMS` to
216216
force :http:`request:browserHtml` or :http:`request:httpResponseBody` to be set
@@ -288,7 +288,7 @@ Here are some things you can try:
288288
(:setting:`ZYTE_API_SESSION_POOL_SIZE`). The more different sessions you
289289
use, the more slowly you send requests through each session.
290290

291-
Mind, however, that :ref:`client-managed sessions <zyte-api-session-id>`
291+
Mind, however, that :ref:`client-managed sessions <zapi-session-id>`
292292
expire after `15 minutes since creation or 2 minutes since the last request
293293
<https://docs.zyte.com/zyte-api/usage/reference.html#operation/extract/request/session>`_.
294294
At a certain point, increasing :setting:`ZYTE_API_SESSION_POOL_SIZE`
@@ -298,7 +298,7 @@ Here are some things you can try:
298298
counterproductive.
299299

300300
- By default, sessions are discarded as soon as an :ref:`unsuccessful
301-
response <zyte-api-unsuccessful-responses>` is received.
301+
response <zapi-unsuccessful-responses>` is received.
302302

303303
However, on some websites sessions may remain valid even after a few
304304
unsuccessful responses. If that is the case, you might want to increase
@@ -308,9 +308,9 @@ Here are some things you can try:
308308
If you do not need :ref:`session checking <session-check>` and your
309309
:ref:`initialization parameters <session-init>` are only
310310
:http:`request:browserHtml` and :http:`request:actions`, :ref:`server-managed
311-
sessions <zyte-api-session-contexts>` might be a more cost-effective choice, as
311+
sessions <zapi-session-contexts>` might be a more cost-effective choice, as
312312
they live much longer than :ref:`client-managed sessions
313-
<zyte-api-session-id>`.
313+
<zapi-session-id>`.
314314

315315

316316
.. _session-configs:
@@ -371,7 +371,7 @@ To include cookies in session initialization requests, use
371371
:http:`request:requestCookies` in :ref:`session initialization parameters
372372
<session-init>`. But mind that those cookies are only set during that request,
373373
:ref:`they are not added to the session cookie jar
374-
<zyte-api-session-cookie-jar>`.
374+
<zapi-session-cookie-jar>`.
375375

376376

377377
Session retry policies
@@ -441,7 +441,7 @@ The following stats exist for scrapy-zyte-api session management:
441441

442442
``scrapy-zyte-api/sessions/pools/{pool}/init/failed``
443443
Number of times that initializing a session for pool ``{pool}`` resulted in
444-
an :ref:`unsuccessful response <zyte-api-unsuccessful-responses>`.
444+
an :ref:`unsuccessful response <zapi-unsuccessful-responses>`.
445445

446446
``scrapy-zyte-api/sessions/pools/{pool}/init/param-error``
447447
Number of times that initializing a session for pool ``{pool}`` triggered
@@ -473,7 +473,7 @@ The following stats exist for scrapy-zyte-api session management:
473473

474474
``scrapy-zyte-api/sessions/pools/{pool}/use/failed``
475475
Number of times that a request that used a session from pool ``{pool}``
476-
got an :ref:`unsuccessful response <zyte-api-unsuccessful-responses>`.
476+
got an :ref:`unsuccessful response <zapi-unsuccessful-responses>`.
477477

478478
``scrapy-zyte-api/sessions/use/disabled``
479479
Number of processed requests for which session management was disabled.

docs/usage/stats.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Stats from :doc:`python-zyte-api <python-zyte-api:index>` are exposed as
99

1010
For example, ``scrapy-zyte-api/status_codes/<status code>`` stats indicate the
1111
status code of Zyte API responses (e.g. ``429`` for :ref:`rate limiting
12-
<zyte-api-rate-limit>` or ``520`` for :ref:`temporary download errors
13-
<zyte-api-temporary-download-errors>`).
12+
<zapi-rate-limit>` or ``520`` for :ref:`temporary download errors
13+
<zapi-temporary-download-errors>`).
1414

1515
.. note:: The actual status code that is received from the target website, i.e.
1616
the :http:`response:statusCode` response field of a :ref:`Zyte API
17-
successful response <zyte-api-successful-responses>`, is accounted for in
17+
successful response <zapi-successful-responses>`, is accounted for in
1818
the ``downloader/response_status_count/<status code>`` stat, as with any
1919
other Scrapy response.

scrapy_zyte_api/_annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class ExtractFrom(str, Enum):
66
""":ref:`Annotation <annotations>` to specify the :ref:`extraction source
7-
<zyte-api-extract-from>` of an automatic extraction :ref:`input <inputs>`,
7+
<zapi-extract-from>` of an automatic extraction :ref:`input <inputs>`,
88
such as :class:`~zyte_common_items.Product` or
99
:class:`~zyte_common_items.Article`.
1010

scrapy_zyte_api/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def replace(self, *args, **kwargs):
5757
def raw_api_response(self) -> Optional[Dict]:
5858
"""Contains the raw API response from Zyte API.
5959
60-
For the full list of parameters, see :ref:`zyte-api-reference`.
60+
For the full list of parameters, see :ref:`zapi-reference`.
6161
"""
6262
return self._raw_api_response
6363

0 commit comments

Comments
 (0)