-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ feedparser and its unit tests are released under the following license: | |
|
||
----- begin license block ----- | ||
|
||
Copyright (C) 2010-2021 Kurt McKee <[email protected]> | ||
Copyright (C) 2010-2022 Kurt McKee <[email protected]> | ||
Copyright (C) 2002-2008 Mark Pilgrim | ||
All rights reserved. | ||
|
||
|
@@ -38,7 +38,7 @@ released under the following license: | |
|
||
----- begin license block ----- | ||
|
||
Copyright (C) 2010-2021 Kurt McKee <[email protected]> | ||
Copyright (C) 2010-2022 Kurt McKee <[email protected]> | ||
Copyright (C) 2004-2008 Mark Pilgrim. All rights reserved. | ||
|
||
Redistribution and use in source (Sphinx ReST) and "compiled" forms (HTML, PDF, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
feedparser - Parse Atom and RSS feeds in Python. | ||
|
||
| Copyright 2010-2021 Kurt McKee <[email protected]> | ||
| Copyright 2010-2022 Kurt McKee <[email protected]> | ||
| Copyright 2002-2008 Mark Pilgrim | ||
feedparser is open source. See the LICENSE file for more information. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This file is part of feedparser. | ||
# Copyright 2020-2021 Kurt McKee <[email protected]> | ||
# Copyright 2020-2022 Kurt McKee <[email protected]> | ||
# Released under the BSD 2-clause license. | ||
|
||
# The tasks defined in this file automates the entire | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
@@ -32,7 +32,7 @@ | |
|
||
__author__ = 'Kurt McKee <[email protected]>' | ||
__license__ = 'BSD 2-clause' | ||
__version__ = '6.0.9' | ||
__version__ = '6.0.10' | ||
|
||
# HTTP "User-Agent" header to send to servers when downloading feeds. | ||
# If you are embedding feedparser in a larger application, you should | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# The public API for feedparser | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Character encoding routines | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Exceptions used throughout feedparser | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
@@ -193,6 +193,7 @@ def __init__(self): | |
self.svgOK = 0 | ||
self.title_depth = -1 | ||
self.depth = 0 | ||
self.hasContent = 0 | ||
if self.lang: | ||
self.feeddata['language'] = self.lang.replace('_', '-') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the Atom, RSS, RDF, and CDF feed formats | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
@@ -259,6 +259,7 @@ def _start_item(self, attrs_d): | |
def _end_item(self): | ||
self.pop('item') | ||
self.inentry = 0 | ||
self.hasContent = 0 | ||
_end_entry = _end_item | ||
|
||
def _start_language(self, attrs_d): | ||
|
@@ -388,7 +389,7 @@ def _end_title(self): | |
|
||
def _start_description(self, attrs_d): | ||
context = self._get_context() | ||
if 'summary' in context: | ||
if 'summary' in context and not self.hasContent: | ||
self._summaryKey = 'content' | ||
self._start_content(attrs_d) | ||
else: | ||
|
@@ -429,7 +430,7 @@ def _end_generator(self): | |
|
||
def _start_summary(self, attrs_d): | ||
context = self._get_context() | ||
if 'summary' in context: | ||
if 'summary' in context and not self.hasContent: | ||
self._summaryKey = 'content' | ||
self._start_content(attrs_d) | ||
else: | ||
|
@@ -466,6 +467,7 @@ def _end_source(self): | |
self.sourcedata.clear() | ||
|
||
def _start_content(self, attrs_d): | ||
self.hasContent = 1 | ||
self.push_content('content', attrs_d, 'text/plain', 1) | ||
src = attrs_d.get('src') | ||
if src: | ||
|
@@ -477,6 +479,7 @@ def _start_body(self, attrs_d): | |
_start_xhtml_body = _start_body | ||
|
||
def _start_content_encoded(self, attrs_d): | ||
self.hasContent = 1 | ||
self.push_content('content', attrs_d, 'text/html', 1) | ||
_start_fullitem = _start_content_encoded | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the administrative elements extension | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the Creative Commons licensing extensions | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the Dublin Core metadata extensions | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the GeoRSS format | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the iTunes format | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the Media RSS format | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Support for the Podlove Simple Chapters format | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# The loose feed parser that interfaces with an SGML parsing library | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# The strict feed parser that interfaces with an XML parsing library | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2010-2021 Kurt McKee <[email protected]> | ||
# Copyright 2010-2022 Kurt McKee <[email protected]> | ||
# Copyright 2002-2008 Mark Pilgrim | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- | ||
Description: entry summary follows content with different value | ||
Expect: not bozo and entries[0]['summary'] == 'Summary' | ||
--> | ||
<feed xmlns="http://www.w3.org/2005/Atom"> | ||
<entry> | ||
<content>Example Atom</content> | ||
<summary>Summary</summary> | ||
</entry> | ||
</feed> |