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

Heise #463

Merged
merged 2 commits into from
Dec 26, 2013
Merged

Heise #463

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spouts/rss/heise.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class heise extends feed {
array("div", "class", "datum_autor", '<div class="artikel_fuss">'), // mac
array("p", "class", "vorlauftext", '<div class="artikel_fuss">'), // mobil
array("div", "id", "blocon", '</div>'), // tp
array("div", "class", "mar0", '<div id="breadcrumb">'), // some tp articles
array("span", "class", "date", '<div xmlns:v="http://rdf'), // tp
array("div", "class", "artikel_content", '<div class="artikel_fuss">'), // resale
array("div", "id", "artikel_shortnews", '<p class="editor">'), // autos
Expand Down Expand Up @@ -160,6 +161,7 @@ public function getContent() {
$content = $this->getTag($div[1], $div[2], $originalContent, $div[0], $div[3]);
if(is_array($content) && count($content)>=1) {
$content = $content[0];
$content = preg_replace('/<script.*?<\/script>/si', '', $content);
$content = preg_replace_callback(',<a([^>]+)href="([^>"\s]+)",i', function($matches) {
return "<a\1href=\"" . \spouts\rss\heise::absolute("\2", "http://www.heise.de") . "\"";},
$content);
Expand Down