Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

add description for media pipeline MEDIA_ALLOW_REDIRECTS and MEDIA_HTTPSTATUS_LIST settings

Bernardas25ed49121992
diff --git a/docs/topics/media-pipeline.rst b/docs/topics/media-pipeline.rst
index 82c0aaa88..a86bab4bf 100644
--- a/docs/topics/media-pipeline.rst
+++ b/docs/topics/media-pipeline.rst
@@ -322,6 +322,22 @@ By default, there are no size constraints, so all images are processed.
.. _topics-media-pipeline-override:
+Allowing redirection and handling various http statuses
+-------------------------------------------------------
+
+.. setting:: MEDIA_ALLOW_REDIRECTS
+.. setting:: MEDIA_HTTPSTATUS_LIST
+
+By default media pipelines ignore redirects. To allow redirecting(all 300 codes) set:
+
+ MEDIA_ALLOW_REDIRECTS = True
+
+To only allow specific codes through set:
+
+ MEDIA_HTTpSTATUS_LIST = <LIST>
+ # example:
+ MEDIA_HTTPSTATUS_LIST = [303, 404]
+
Extending the Media Pipelines
=============================