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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>entries[i].source [Universal Feed Parser]</title>
<link rel="stylesheet" href="feedparser.css" type="text/css">
<link rev="made" href="mailto:mark@diveintomark.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="reference.html" title="Reference">
<link rel="prev" href="reference-entry-tags.html" title="entries[i].tags">
<link rel="next" href="reference-entry-comments.html" title="entries[i].comments">
</head>
<body id="feedparser-org" class="docs">
<div class="z" id="intro"><div class="sectionInner"><div class="sectionInner2">
<div class="s" id="pageHeader">
<h1><a href="/"><span>Universal Feed Parser</span></a></h1>
<p><span>Parse RSS and Atom feeds in Python. 3000 unit tests. Open source.</span></p>
</div>
<div class="s" id="quickSummary"><ul>
<li class="li1">
<a href="http://sourceforge.net/projects/feedparser/"><span>Download</span></a> ·</li>
<li class="li2">
<a href="http://feedparser.org/docs/"><span>Documentation</span></a> ·</li>
<li class="li3">
<a href="http://feedparser.org/tests/"><span>Unit tests</span></a> ·</li>
<li class="li4"><a href="http://sourceforge.net/tracker/?func=browse&group_id=112328&atid=661937"><span>Report a bug</span></a></li>
</ul></div>
</div></div></div>
<div id="main"><div id="mainInner">
<p id="breadcrumb">You are here: <a href="index.html">Documentation</a> → <a href="reference.html">Reference</a> → <span class="thispage">entries[i].source</span></p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h2 class="title">
<a name="reference.entry.source" class="skip" href="#reference.entry.source" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source</h2></div></div>
<div></div>
</div>
<div class="abstract"><p>A dictionary with details about the source of the entry.</p></div>
<div class="reference-from">
<h3>Comes from</h3>
<ul><li><tt class="literal">/atom10:feed/atom10:entry/atom10:source</tt></li></ul>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.author" class="skip" href="#reference.entry.source.author" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.author</h3></div></div>
<div></div>
</div>
<p>The author of the source of this entry.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.author_detail" class="skip" href="#reference.entry.source.author_detail" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.author_detail</h3></div></div>
<div></div>
</div>
<p>A dictionary containing details about the author of the source of this entry.</p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.author_detail.name" class="skip" href="#reference.entry.source.author_detail.name" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.author_detail.name</h4></div></div>
<div></div>
</div>
<p>The name of the author of the source of this entry.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.author_detail.href" class="skip" href="#reference.entry.source.author_detail.href" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.author_detail.href</h4></div></div>
<div></div>
</div>
<p>The <acronym title="Uniform Resource Locator">URL</acronym> of the author of the source of this entry. This can be the author's home page, or a contact page with a webmail form.</p>
<p>If this is a relative <acronym title="Uniform Resource Identifier">URI</acronym>, it is <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.author_detail.email" class="skip" href="#reference.entry.source.author_detail.email" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.author_detail.email</h4></div></div>
<div></div>
</div>
<p>The email address of the author of the source of this entry.</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.contributors" class="skip" href="#reference.entry.source.contributors" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.contributors</h3></div></div>
<div></div>
</div>
<p>A list of contributors to the source of this entry.</p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.contributors.name" class="skip" href="#reference.entry.source.contributors.name" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.contributors[j].name</h4></div></div>
<div></div>
</div>
<p>The name of a contributor to the source of this entry.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.contributors.href" class="skip" href="#reference.entry.source.contributors.href" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.contributors[j].href</h4></div></div>
<div></div>
</div>
<p>The <acronym title="Uniform Resource Locator">URL</acronym> of a contributor to the source of this entry. This can be the contributor's home page, or a contact page with a webmail form.</p>
<p>If this is a relative <acronym title="Uniform Resource Identifier">URI</acronym>, it is <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.contributors.email" class="skip" href="#reference.entry.source.contributors.email" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.contributors[j].email</h4></div></div>
<div></div>
</div>
<p>The email address of a contributor to the source of this entry.</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.icon" class="skip" href="#reference.entry.source.icon" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.icon</h3></div></div>
<div></div>
</div>
<p>The <acronym title="Uniform Resource Locator">URL</acronym> of an icon representing the source of this entry.</p>
<p>If this is a relative <acronym title="Uniform Resource Identifier">URI</acronym>, it is <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.id" class="skip" href="#reference.entry.source.id" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.id</h3></div></div>
<div></div>
</div>
<p>A globally unique identifier for the source of this entry.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.link" class="skip" href="#reference.entry.source.link" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.link</h3></div></div>
<div></div>
</div>
<p>The primary permanent link of the source of this entry</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.links" class="skip" href="#reference.entry.source.links" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.links</h3></div></div>
<div></div>
</div>
<p>A list of all links defined by the source of this entry.</p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.links.rel" class="skip" href="#reference.entry.source.links.rel" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.links[j].rel</h4></div></div>
<div></div>
</div>
<p>The relationship of a link defined by the source of this entry.</p>
<p>Atom 1.0 defines five standard link relationships and describes the process for registering others. Here are the five standard <tt class="sgmltag-attribute">rel</tt> values:</p>
<div class="itemizedlist"><ul>
<li><tt class="constant">alternate</tt></li>
<li><tt class="constant">self</tt></li>
<li><tt class="constant">related</tt></li>
<li><tt class="constant">via</tt></li>
<li><tt class="constant">enclosure</tt></li>
</ul></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.links.type" class="skip" href="#reference.entry.source.links.type" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.links[j].type</h4></div></div>
<div></div>
</div>
<p>The content type of the page pointed to by a link defined by the source of this entry.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.links.href" class="skip" href="#reference.entry.source.links.href" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.links[j].href</h4></div></div>
<div></div>
</div>
<p>The <acronym title="Uniform Resource Locator">URL</acronym> of the page pointed to by a link defined by the source of this entry.</p>
<p>If this is a relative <acronym title="Uniform Resource Identifier">URI</acronym>, it is <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.links.title" class="skip" href="#reference.entry.source.links.title" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.links[j].title</h4></div></div>
<div></div>
</div>
<p>The title of a link defined by the source of this entry.</p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.logo" class="skip" href="#reference.entry.source.logo" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.logo</h3></div></div>
<div></div>
</div>
<p>The <acronym title="Uniform Resource Locator">URL</acronym> of a logo representing the source of this entry.</p>
<p>If this is a relative <acronym title="Uniform Resource Identifier">URI</acronym>, it is <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.rights" class="skip" href="#reference.entry.source.rights" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.rights</h3></div></div>
<div></div>
</div>
<p>A human-readable copyright statement for the source of this entry.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.rights_detail" class="skip" href="#reference.entry.source.rights_detail" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.rights_detail</h3></div></div>
<div></div>
</div>
<p>A dictionary containing details about the copyright statement for the source of this entry.</p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.rights_detail.value" class="skip" href="#reference.entry.source.rights_detail.value" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.rights_detail.value</h4></div></div>
<div></div>
</div>
<p>Same as <a href="reference-entry-source.html#reference.entry.source.rights" title="entries[i].source.rights">entries[i].source.rights</a>.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, it is <a href="html-sanitization.html" title="HTML Sanitization">sanitized</a> by default.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, certain (X)HTML elements within this value may contain relative <acronym title="Uniform Resource Identifier">URI</acronym>s. If so, they are <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.rights_detail.type" class="skip" href="#reference.entry.source.rights_detail.type" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.rights_detail.type</h4></div></div>
<div></div>
</div>
<p>The content type of the copyright statement for the source of this entry.</p>
<p>Most likely values for <tt class="varname">type</tt>:</p>
<div class="itemizedlist"><ul>
<li><tt class="constant">text/plain</tt></li>
<li><tt class="constant">text/html</tt></li>
<li><tt class="constant">application/xhtml+xml</tt></li>
</ul></div>
<p>For Atom feeds, the content type is taken from the <tt class="sgmltag-attribute">type</tt> attribute, which defaults to <tt class="constant">text/plain</tt> if not specified. For <acronym title="Rich Site Summary">RSS</acronym> feeds, the content type is auto-determined by inspecting the content, and defaults to <tt class="constant">text/html</tt>. Note that this may cause silent data loss if the value contains plain text with angle brackets. There is nothing I can do about this problem; it is a limitation of <acronym title="Rich Site Summary">RSS</acronym>.</p>
<p>Future enhancement: some versions of <acronym title="Rich Site Summary">RSS</acronym> clearly specify that certain values default to <tt class="constant">text/plain</tt>, and <span class="application">Universal Feed Parser</span> should respect this, but it doesn't yet.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.rights_detail.language" class="skip" href="#reference.entry.source.rights_detail.language" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.rights_detail.language</h4></div></div>
<div></div>
</div>
<p>The language of the copyright statement for the source of this entry.</p>
<p><tt class="varname">language</tt> is supposed to be a language code, as specified by <a href="http://www.ietf.org/rfc/rfc3066.txt"><acronym title="Request For Comments">RFC</acronym> 3066</a>, but publishers have been known to publish random values like “<span class="quote">English</span>” or “<span class="quote">German</span>”. <span class="application">Universal Feed Parser</span> does not do any parsing or normalization of language codes.</p>
<p><tt class="varname">language</tt> may come from the element's <tt class="sgmltag-attribute">xml:lang</tt> attribute, or it may inherit from a parent element's <tt class="sgmltag-attribute">xml:lang</tt>, or the <tt class="literal">Content-Language</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header. If the feed does not specify a language, <tt class="varname">language</tt> will be <tt class="constant">None</tt>, the <span class="application">Python</span> null value.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.rights_detail.base" class="skip" href="#reference.entry.source.rights_detail.base" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.rights_detail.base</h4></div></div>
<div></div>
</div>
<p>The original base <acronym title="Uniform Resource Identifier">URI</acronym> for links within the copyright statement for the source of this entry.</p>
<p><tt class="varname">base</tt> is only useful in rare situations and can usually be ignored. It is the original base <acronym title="Uniform Resource Identifier">URI</acronym> for this value, as specified by the element's <tt class="sgmltag-attribute">xml:base</tt> attribute, or a parent element's <tt class="sgmltag-attribute">xml:base</tt>, or the appropriate <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header, or the <acronym title="Uniform Resource Identifier">URI</acronym> of the feed. (See <a href="resolving-relative-links.html" title="Relative Link Resolution">Relative Link Resolution</a> for more details.) By the time you see it, <span class="application">Universal Feed Parser</span> has already resolved relative links in all values where it makes sense to do so. <span class="emphasis"><em>Clients should never need to manually resolve relative links.</em></span></p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.subtitle" class="skip" href="#reference.entry.source.subtitle" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.subtitle</h3></div></div>
<div></div>
</div>
<p>A subtitle, tagline, slogan, or other short description of the source of this entry.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, it is <a href="html-sanitization.html" title="HTML Sanitization">sanitized</a> by default.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, certain (X)HTML elements within this value may contain relative <acronym title="Uniform Resource Identifier">URI</acronym>s. If so, they are <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.subtitle_details" class="skip" href="#reference.entry.source.subtitle_details" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.subtitle_detail</h3></div></div>
<div></div>
</div>
<p>A dictionary containing details about the subtitle for the source of this entry.</p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.subtitle_detail.value" class="skip" href="#reference.entry.source.subtitle_detail.value" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.subtitle_detail.value</h4></div></div>
<div></div>
</div>
<p>Same as <a href="reference-entry-source.html#reference.entry.source.subtitle" title="entries[i].source.subtitle">entries[i].source.subtitle</a>.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, it is <a href="html-sanitization.html" title="HTML Sanitization">sanitized</a> by default.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, certain (X)HTML elements within this value may contain relative <acronym title="Uniform Resource Identifier">URI</acronym>s. If so, they are <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.subtitle_detail.type" class="skip" href="#reference.entry.source.subtitle_detail.type" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.subtitle_detail.type</h4></div></div>
<div></div>
</div>
<p>The content type of the subtitle of the source of this entry.</p>
<p>Most likely values for <tt class="varname">type</tt>:</p>
<div class="itemizedlist"><ul>
<li><tt class="constant">text/plain</tt></li>
<li><tt class="constant">text/html</tt></li>
<li><tt class="constant">application/xhtml+xml</tt></li>
</ul></div>
<p>For Atom feeds, the content type is taken from the <tt class="sgmltag-attribute">type</tt> attribute, which defaults to <tt class="constant">text/plain</tt> if not specified. For <acronym title="Rich Site Summary">RSS</acronym> feeds, the content type is auto-determined by inspecting the content, and defaults to <tt class="constant">text/html</tt>. Note that this may cause silent data loss if the value contains plain text with angle brackets. There is nothing I can do about this problem; it is a limitation of <acronym title="Rich Site Summary">RSS</acronym>.</p>
<p>Future enhancement: some versions of <acronym title="Rich Site Summary">RSS</acronym> clearly specify that certain values default to <tt class="constant">text/plain</tt>, and <span class="application">Universal Feed Parser</span> should respect this, but it doesn't yet.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.subtitle_detail.language" class="skip" href="#reference.entry.source.subtitle_detail.language" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.subtitle_detail.language</h4></div></div>
<div></div>
</div>
<p>The language of the subtitle of the source of this entry.</p>
<p><tt class="varname">language</tt> is supposed to be a language code, as specified by <a href="http://www.ietf.org/rfc/rfc3066.txt"><acronym title="Request For Comments">RFC</acronym> 3066</a>, but publishers have been known to publish random values like “<span class="quote">English</span>” or “<span class="quote">German</span>”. <span class="application">Universal Feed Parser</span> does not do any parsing or normalization of language codes.</p>
<p><tt class="varname">language</tt> may come from the element's <tt class="sgmltag-attribute">xml:lang</tt> attribute, or it may inherit from a parent element's <tt class="sgmltag-attribute">xml:lang</tt>, or the <tt class="literal">Content-Language</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header. If the feed does not specify a language, <tt class="varname">language</tt> will be <tt class="constant">None</tt>, the <span class="application">Python</span> null value.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.subtitle_detail.base" class="skip" href="#reference.entry.source.subtitle_detail.base" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.subtitle_detail.base</h4></div></div>
<div></div>
</div>
<p>The original base <acronym title="Uniform Resource Identifier">URI</acronym> for links within the subtitle of the source of this entry.</p>
<p><tt class="varname">base</tt> is only useful in rare situations and can usually be ignored. It is the original base <acronym title="Uniform Resource Identifier">URI</acronym> for this value, as specified by the element's <tt class="sgmltag-attribute">xml:base</tt> attribute, or a parent element's <tt class="sgmltag-attribute">xml:base</tt>, or the appropriate <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header, or the <acronym title="Uniform Resource Identifier">URI</acronym> of the feed. (See <a href="resolving-relative-links.html" title="Relative Link Resolution">Relative Link Resolution</a> for more details.) By the time you see it, <span class="application">Universal Feed Parser</span> has already resolved relative links in all values where it makes sense to do so. <span class="emphasis"><em>Clients should never need to manually resolve relative links.</em></span></p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.title" class="skip" href="#reference.entry.source.title" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.title</h3></div></div>
<div></div>
</div>
<p>The title of the source of this entry.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, it is <a href="html-sanitization.html" title="HTML Sanitization">sanitized</a> by default.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, certain (X)HTML elements within this value may contain relative <acronym title="Uniform Resource Identifier">URI</acronym>s. If so, they are <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.title_details" class="skip" href="#reference.entry.source.title_details" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.title_detail</h3></div></div>
<div></div>
</div>
<p>A dictionary containing details about the title for the source of this entry.</p>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.title_detail.value" class="skip" href="#reference.entry.source.title_detail.value" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.title_detail.value</h4></div></div>
<div></div>
</div>
<p>Same as <a href="reference-entry-source.html#reference.entry.source.title" title="entries[i].source.title">entries[i].source.title</a>.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, it is <a href="html-sanitization.html" title="HTML Sanitization">sanitized</a> by default.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, certain (X)HTML elements within this value may contain relative <acronym title="Uniform Resource Identifier">URI</acronym>s. If so, they are <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.title_detail.type" class="skip" href="#reference.entry.source.title_detail.type" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.title_detail.type</h4></div></div>
<div></div>
</div>
<p>The content type of the title of the source of this entry.</p>
<p>Most likely values for <tt class="varname">type</tt>:</p>
<div class="itemizedlist"><ul>
<li><tt class="constant">text/plain</tt></li>
<li><tt class="constant">text/html</tt></li>
<li><tt class="constant">application/xhtml+xml</tt></li>
</ul></div>
<p>For Atom feeds, the content type is taken from the <tt class="sgmltag-attribute">type</tt> attribute, which defaults to <tt class="constant">text/plain</tt> if not specified. For <acronym title="Rich Site Summary">RSS</acronym> feeds, the content type is auto-determined by inspecting the content, and defaults to <tt class="constant">text/html</tt>. Note that this may cause silent data loss if the value contains plain text with angle brackets. There is nothing I can do about this problem; it is a limitation of <acronym title="Rich Site Summary">RSS</acronym>.</p>
<p>Future enhancement: some versions of <acronym title="Rich Site Summary">RSS</acronym> clearly specify that certain values default to <tt class="constant">text/plain</tt>, and <span class="application">Universal Feed Parser</span> should respect this, but it doesn't yet.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.title_detail.language" class="skip" href="#reference.entry.source.title_detail.language" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.title_detail.language</h4></div></div>
<div></div>
</div>
<p>The language of the title of the source of this entry.</p>
<p><tt class="varname">language</tt> is supposed to be a language code, as specified by <a href="http://www.ietf.org/rfc/rfc3066.txt"><acronym title="Request For Comments">RFC</acronym> 3066</a>, but publishers have been known to publish random values like “<span class="quote">English</span>” or “<span class="quote">German</span>”. <span class="application">Universal Feed Parser</span> does not do any parsing or normalization of language codes.</p>
<p><tt class="varname">language</tt> may come from the element's <tt class="sgmltag-attribute">xml:lang</tt> attribute, or it may inherit from a parent element's <tt class="sgmltag-attribute">xml:lang</tt>, or the <tt class="literal">Content-Language</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header. If the feed does not specify a language, <tt class="varname">language</tt> will be <tt class="constant">None</tt>, the <span class="application">Python</span> null value.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h4 class="title">
<a name="reference.entry.source.title_detail.base" class="skip" href="#reference.entry.source.title_detail.base" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.title_detail.base</h4></div></div>
<div></div>
</div>
<p>The original base <acronym title="Uniform Resource Identifier">URI</acronym> for links within the title of the source of this entry.</p>
<p><tt class="varname">base</tt> is only useful in rare situations and can usually be ignored. It is the original base <acronym title="Uniform Resource Identifier">URI</acronym> for this value, as specified by the element's <tt class="sgmltag-attribute">xml:base</tt> attribute, or a parent element's <tt class="sgmltag-attribute">xml:base</tt>, or the appropriate <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header, or the <acronym title="Uniform Resource Identifier">URI</acronym> of the feed. (See <a href="resolving-relative-links.html" title="Relative Link Resolution">Relative Link Resolution</a> for more details.) By the time you see it, <span class="application">Universal Feed Parser</span> has already resolved relative links in all values where it makes sense to do so. <span class="emphasis"><em>Clients should never need to manually resolve relative links.</em></span></p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.updated" class="skip" href="#reference.entry.source.updated" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.updated</h3></div></div>
<div></div>
</div>
<p>The date the source of this entry was last updated, as a string in the same format as it was published in the original feed.</p>
<p>This element is <a href="date-parsing.html" title="Date Parsing">parsed as a date</a> and stored in <a href="reference-entry-source.html#reference.entry.source.updated_parsed" title="entries[i].source.updated_parsed">entries[i].source.updated_parsed</a>.</p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
<a name="reference.entry.source.updated_parsed" class="skip" href="#reference.entry.source.updated_parsed" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> entries[i].source.updated_parsed</h3></div></div>
<div></div>
</div>
<p>The date this entry was last updated, as a standard <span class="application">Python</span> 9-tuple.</p>
</div>
</div>
<div style="float: left">← <a class="NavigationArrow" href="reference-entry-tags.html">entries[i].tags</a>
</div>
<div style="text-align: right">
<a class="NavigationArrow" href="reference-entry-comments.html">entries[i].comments</a> →</div>
<hr style="clear:both">
<div class="footer"><p class="copyright">Copyright © 2004, 2005, 2006 Mark Pilgrim</p></div>
</div></div>
</body>
</html>
|