fastfeedparser 0.5.7__tar.gz → 0.5.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastfeedparser
3
- Version: 0.5.7
3
+ Version: 0.5.8
4
4
  Summary: High performance RSS, Atom, JSON and RDF feed parser in Python
5
5
  Home-page: https://github.com/kagisearch/fastfeedparser
6
6
  Author: Vladimir Prelovac
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = fastfeedparser
3
- version = 0.5.7
3
+ version = 0.5.8
4
4
  author = Vladimir Prelovac
5
5
  author_email = vlad@kagi.com
6
6
  description = High performance RSS, Atom, JSON and RDF feed parser in Python
@@ -991,8 +991,19 @@ def _parse_feed_info(
991
991
  for link in channel.findall(f"{{{atom_ns}}}link"):
992
992
  rel = link.get("rel")
993
993
  href = link.get("href") or link.get("link")
994
- if rel is None and href:
994
+ if rel == "alternate" and href and not feed_link:
995
995
  feed_link = href
996
+ feed_links.append(
997
+ {
998
+ "rel": rel,
999
+ "type": link.get("type"),
1000
+ "href": href,
1001
+ "title": link.get("title"),
1002
+ }
1003
+ )
1004
+ elif rel is None and href:
1005
+ if not feed_link:
1006
+ feed_link = href
996
1007
  elif rel not in {"hub", "self", "replies", "edit"}:
997
1008
  feed_links.append(
998
1009
  {
@@ -1134,7 +1145,10 @@ def _populate_entry_links_from_elements(
1134
1145
  "title": link.get("title"),
1135
1146
  }
1136
1147
  if rel == "alternate":
1137
- alternate_link = link_dict
1148
+ if alternate_link is None:
1149
+ alternate_link = link_dict
1150
+ else:
1151
+ entry_links.append(link_dict)
1138
1152
  elif rel not in {"edit", "self"}:
1139
1153
  entry_links.append(link_dict)
1140
1154
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastfeedparser
3
- Version: 0.5.7
3
+ Version: 0.5.8
4
4
  Summary: High performance RSS, Atom, JSON and RDF feed parser in Python
5
5
  Home-page: https://github.com/kagisearch/fastfeedparser
6
6
  Author: Vladimir Prelovac
File without changes
File without changes