File: reference-feed-image.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 (107 lines) | stat: -rw-r--r-- 2,819 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
:py:attr:`feed.image`
=====================

A dictionary with details about the feed image.  A feed image can be a logo,
banner, or a picture of the author.


.. _reference.feed.image.title:

:py:attr:`feed.image.title`
---------------------------

The alternate text of the feed image, which would go in the alt attribute if
you rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
element.


.. _reference.feed.image.href:

:py:attr:`feed.image.href`
--------------------------

The :abbr:`URL (Uniform Resource Locator)` of the feed image itself, which
would go in the src attribute if you rendered the feed image as an :abbr:`HTML
(HyperText Markup Language)` img element.

If this is a relative :abbr:`URI (Uniform Resource Identifier)`, it is
:ref:`resolved according to a set of rules <advanced.base>`.


.. _reference.feed.image.link:

:py:attr:`feed.image.link`
--------------------------

The :abbr:`URL (Uniform Resource Locator)` which the feed image would point to.
If you rendered the feed image as an :abbr:`HTML (HyperText Markup Language)`
img element, you would wrap it in an a element and put this in the href
attribute.

If this is a relative :abbr:`URI (Uniform Resource Identifier)`, it is
:ref:`resolved according to a set of rules <advanced.base>`.


.. _reference.feed.image.width:

:py:attr:`feed.image.width`
---------------------------

The width of the feed image, which would go in the width attribute if you
rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
element.


.. _reference.feed.image.height:

:py:attr:`feed.image.height`
----------------------------

The height of the feed image, which would go in the height attribute if you
rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
element.


:py:attr:`feed.image.description`
---------------------------------

A short description of the feed image, which would go in the title attribute if
you rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
element.  This element is rare; it was available in Netscape :abbr:`RSS (Rich
Site Summary)` 0.91 but was dropped from Userland :abbr:`RSS (Rich Site
Summary)` 0.91.


.. rubric:: Annotated example

This is a feed image:
::


    <image>
    <title>Feed logo</title>
    <url>http://example.org/logo.png</url>
    <link>http://example.org/</link>
    <width>80</width>
    <height>15</height>
    <description>Visit my home page</description>
    </image>


This feed image could be rendered in :abbr:`HTML (HyperText Markup Language)` as this:
::


    <a href="http://example.org/">
    <img src="http://example.org/logo.png"
    width="80"
    height="15"
    alt="Feed logo"
    title="Visit my home page">
    </a>


.. rubric:: Comes from

* /rdf:RDF/rdf:image
* /rss/channel/image