Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item::get_description() returns null #859

Open
marc-farre opened this issue Feb 7, 2024 · 2 comments
Open

Item::get_description() returns null #859

marc-farre opened this issue Feb 7, 2024 · 2 comments

Comments

@marc-farre
Copy link

marc-farre commented Feb 7, 2024

I have the RSS feed below (source: https://www.telegraaf.nl/entertainment/rss).
In each <item> tag, we have the <description> tag containing a text in a <p> HTML tag.

If I do foreach ($feed->get_items() as $item) {var_dump($item->get_description())} I have NULL.

Thanks in advance!

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/statics/rss/transform-feed.xsl" media="screen"?>
<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:meta="http://rss.telegraaf.nl/meta" version="2.0">
  <meta:alternative title="Voorpagina" href="/rss"/>
  <meta:alternative title="Nieuws Overzicht" href="/nieuws/rss"/>
  <meta:alternative title="Sport Overzicht" href="/sport/rss"/>
  <meta:alternative title="Entertainment Overzicht" href="/entertainment/rss" active="active"/>
  <meta:alternative title="Financieel Overzicht" href="/financieel/rss"/>
  <meta:alternative title="Vrouw Overzicht" href="/vrouw/rss"/>
  <meta:alternative title="Video Overzicht" href="/video/rss"/>
  <meta:alternative title="Wat U Zegt Overzicht" href="/watuzegt/rss"/>
  <meta:alternative title="Lifestyle Overzicht" href="/lifestyle/rss"/>
  <meta:params transform="transform" count="25"/>
  <channel>
    <title>De Telegraaf</title>
    <link>https://www.telegraaf.nl</link>
    <description>Het laatste nieuws uit Nederland leest u op Telegraaf.nl</description>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="https://www.telegraaf.nl/rss"/>
    <copyright>Mediahuis Nederland B.V., Amsterdam. Deze website is uitsluitend bedoeld voor persoonlijk, niet-commercieel gebruik. Op ieder gebruik van de website zijn de Algemene Voorwaarden van toepassing; https://www.mediahuis.nl/algemene-voorwaarden/gebruikersvoorwaarden-uitgaven/.</copyright>
    <item>
      <title><![CDATA[Kevin Spacey schikt voor 1 miljoen dollar met productiebedrijf achter House of cards]]></title>
      <link>https://www.telegraaf.nl/entertainment/578277372/kevin-spacey-schikt-voor-1-miljoen-dollar-met-productiebedrijf-achter-house-of-cards?utm_source=RSS&amp;utm_medium=RSS</link>
      <description>
        <p class="intro">Kevin Spacey gaat voor 1 miljoen dollar (zo’n 929.000 euro) schikken met MRC, het productiebedrijf achter de Netflix-serie House of cards. Dat meldt Variety. Spacey werd in 2017 uit de serie gezet om aantijgingen van grensoverschrijdend gedrag, waarvoor hij vorig jaar is vrijgesproken.</p>
      </description>
      <guid>https://www.telegraaf.nl/guid/578277372</guid>
      <category>Sterren</category>
      <pubDate>Wed, 07 Feb 2024 10:49:35 +0100</pubDate>
      <premium>0</premium>
      <enclosure url="https://www.telegraaf.nl/images/1200x630/filters:format(jpeg):quality(80)/cdn-kiosk-api.telegraaf.nl/33b2b2cc-c59e-11ee-8d76-0217670beecd.jpg" length="0" type="image/jpeg"/>
      <media:content type="image/jpeg" url="https://www.telegraaf.nl/images/1200x630/filters:format(jpeg):quality(80)/cdn-kiosk-api.telegraaf.nl/33b2b2cc-c59e-11ee-8d76-0217670beecd.jpg">
        <media:thumbnail url="https://www.telegraaf.nl/images/230x230/filters:format(jpeg):quality(70)/cdn-kiosk-api.telegraaf.nl/33b2b2cc-c59e-11ee-8d76-0217670beecd.jpg"/>
      </media:content>
    </item>
...
@skyzyx
Copy link
Member

skyzyx commented Apr 10, 2024

Did you run the SimplePie compatibility test? 99% of the time, this issue is related to an old/broken XML parser in your PHP installation.

@marc-farre
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants