Quantcast
Channel: Active questions tagged feedparser - Stack Overflow
Viewing all articles
Browse latest Browse all 99

Output of feedparser in python unexpectedly truncated

$
0
0

I'm writing a piece of code that parses information from an RSS feed. I am storing the parsed informations for later research. In the case at hand I'd like to store info such as [Name, Surname, Type of Insidertrade, Price, ...].

My Problem

The string I'm trying to parse has >1800 characters but the string my parser outputs only has around 330 and ends with a "...".My question is How can I adjust the maximum length of the string feedparser parses in Python? or Why is my code truncated and not listed in its entired when printing or storing it?

What I've tried

import feedparserInsiderFeed = feedparser.parse("https://www.finanztreff.de/rdf_news_category-insidertrades.rss")summary = InsiderFeed.entries[0].summary # just to give one example here instead of looping through full listprint(summary)

Output

Looks like:

Notification and public disclosure of transactions by persons discharging managerial responsibilities and persons closely associated with them 23.06.2020 / 18:37 The issuer is solely responsible for the content of this announcement. *1. Details of the person discharging managerial responsibilities / person closely associated*...

but should look like: (ignoring brakes \n which seem to be sanitized by default by feedparser)

Notification and public disclosure of transactions by persons dischargingmanagerial responsibilities and persons closely associated with them23.06.2020 / 18:37The issuer is solely responsible for the content of this announcement.*1. Details of the person discharging managerial responsibilities / personclosely associated*a) Name+++|Name and legal form:|Krüper + Krüper Hochallee 60 GbR|+++*2. Reason for the notification*a) Position / status+++|Person closely associated with: |+++|Title: |Dr. |+++|First name: |Manfred |+++|Last name(s): |Krüper |+++|Position: |Member of the administrative or supervisory || |body |+++b) Initial notification*3. Details of the issuer, emission allowance market participant, auctionplatform, auctioneer or auction monitor*a) Name++|ENCAVIS AG|++b) LEI++|391200ECRGNL09Y2KJ67|++*4. Details of the transaction(s)*a) Description of the financial instrument, type of instrument,identification code+++|Type:|Share |+++|ISIN:|DE0006095003|+++b) Nature of the transaction++|Erwerb von neuen Aktien durch die Ausübung von 10.363 ||Bezugsrechten im Rahmen der Aktiendividende der Encavis AG. ||10.363 : 60,25 = 172 neue Aktien. |++c) Price(s) and volume(s)+++|Price(s) |Volume(s) |+++|10.845 EUR|1865.34 EUR|+++d) Aggregated information+++|Price |Aggregated volume|+++|10.8450 EUR|1865.3400 EUR |+++e) Date of the transaction++|2020-06-19; UTC+2|++f) Place of the transaction++|Outside a trading venue|++23.06.2020 The DGAP Distribution Services include Regulatory Announcements,Financial/Corporate News and Press Releases.Archive at www.dgap.deLanguage: EnglishCompany: ENCAVIS AGGroße Elbstraße 5922767 HamburgGermanyInternet: www.encavis.comEnd of News DGAP News Service60877 23.06.2020(END) Dow Jones NewswiresJune 23, 2020 12:38 ET ( 16:38 GMT) 

using this example here http://www.finanztreff.de/news/dgap-dd-encavis-ag-english/20845911.

I have also tried to find a suitable flag / keyword to define the max length of my parsed string in the feedparser documentation but with no luck.

Looking forward to you help, it's much appreciated!


Viewing all articles
Browse latest Browse all 99

Latest Images

Trending Articles





Latest Images