0

I updated my (already) working code from python2.7 to python3.5 and the following problem suddenly appears.

By parsing the given ATOM feed with many entries (correct syntax), feedparser 5.2.1. returns only the first entry of the feed and of course the "meta" data of the feed.

My (unmodified) code:

feed_data = feedparser.parse("www.myfeed.com/myfeeds.atom")
for entry in feed_data.entries:
    print(entry)

output

{'uid':'99999','author':'XY', ...more content of the first entry...}
{}

The next (second) entry is empty... and the other entries are not even listed... The lenght of feed_data.entries is 2 (it should be 78).

UPDATE

Now (today) I get 3 entries as output, because one new entry was appended at the beginning of the entry-list, so I guess it is an "encoding" problem with the specific 3rd entry in the current feed.

Any ideas how to fix the problem?

Bugs
  • 4,491
  • 9
  • 32
  • 41
zypro
  • 1,158
  • 3
  • 12
  • 33
  • Guessing there is something wrong w/your atom feed. That code would work fine on a diff feed such as: https://www.theregister.co.uk/data_centre/networks/headlines.atom – Chris Aug 09 '17 at 15:01
  • It works fine under python 2.7 (and maybe an older version von feedparser) with exactly the same (working) atom feed, but under python3.5 it fails. – zypro Aug 10 '17 at 07:47
  • It might be tough to troubleshoot without being able to pull the exact feed you are trying to pull. – Chris Aug 10 '17 at 12:17

1 Answers1

0

Okay guys,

Python3.5 is not supported yet. But the support for this python version is prepared in the develop branch of the github project (see here).

It works with this development version of feedparser, so I'll try this and might wait (nothing happend sind one year) until the official release of this "feature".

zypro
  • 1,158
  • 3
  • 12
  • 33