Skip to content

Commit 7dd66ed

Browse files
committed
Fix documentation issue replace headers with request_headers
1 parent 567530e commit 7dd66ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

advertools/sitemaps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@
413413
.. code-block::
414414
:class: thebe, thebe-init
415415
416-
adv.sitemap_to_df("https://www.ft.com/sitemaps/news.xml", headers={"User-agent": "YOUR-USER-AGENT"})
416+
adv.sitemap_to_df("https://www.ft.com/sitemaps/news.xml", request_headers={"User-agent": "YOUR-USER-AGENT"})
417417
418418
Another interesting thing you might want to do is utilize the `If-None-Match` header.
419419
In many cases the sitemaps return an etag for the sitemap. This is to make it easier to
@@ -438,7 +438,7 @@
438438
etag = ft['etag'][0]
439439
440440
# Second time:
441-
ft = adv.sitemap_to_df("https://www.ft.com/sitemaps/news.xml", headers={"If-None-Match": etag})
441+
ft = adv.sitemap_to_df("https://www.ft.com/sitemaps/news.xml", request_headers={"If-None-Match": etag})
442442
""" # noqa: E501
443443

444444
import logging

0 commit comments

Comments
 (0)