File: reference-status.rst

package info (click to toggle)
feedparser 6.0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,540 kB
  • sloc: xml: 11,459; python: 4,575; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 868 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
:py:attr:`status`
=================

The :abbr:`HTTP (Hypertext Transfer Protocol)` status code that was returned by
the web server when the feed was fetched.

If the feed was redirected from its original :abbr:`URL (Uniform Resource Locator)`,
:py:attr:`status` will contain the redirect status code, not the final status
code.

If :py:attr:`status` is ``301``, the feed was permanently redirected to a new
:abbr:`URL (Uniform Resource Locator)`.  Clients should update their address
book to request the new :abbr:`URL (Uniform Resource Locator)` from now on.

If :py:attr:`status` is ``410``, the feed is gone.  Clients should stop polling the
feed.

.. tip::

    :py:attr:`status` will only be present if the feed was retrieved from a web
    server.  If the feed was parsed from a local file or from a string in memory,
    :py:attr:`status` will not be present.