mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 17:44:48 +02:00
MemoLinux SegFaultMint fixes
This commit is contained in:
parent
206bcdf712
commit
b6602fc8e3
2 changed files with 12 additions and 16 deletions
|
@ -1,15 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @name MemoLinux
|
||||
* @description Returns the 20 newest posts from MemoLinux (full text)
|
||||
*@maintainer qwertygc
|
||||
* @homepage http://memo-linux.com/
|
||||
* @description Returns the 10 newest posts from MemoLinux (full text)
|
||||
* @maintainer qwertygc
|
||||
* @update 2014-07-07
|
||||
*/
|
||||
class MemoLinuxBridge extends BridgeAbstract{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function collectData(array $param){
|
||||
|
||||
function StripCDATA($string) {
|
||||
|
@ -22,6 +20,7 @@ class MemoLinuxBridge extends BridgeAbstract{
|
|||
$text = $html2->find('div.post-content', 0)->innertext;
|
||||
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
|
||||
$text = preg_replace('@<div[^>]*?>.*?</div>@si', '', $text);
|
||||
$text = preg_replace("/<h1.*/", '', $text);
|
||||
return $text;
|
||||
}
|
||||
$html = file_get_html('http://memo-linux.com/feed/') or $this->returnError('Could not request MemoLinux.', 404);
|
||||
|
@ -50,7 +49,6 @@ class MemoLinuxBridge extends BridgeAbstract{
|
|||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
// return 3600; // 1 hour
|
||||
return 0; // 1 hour
|
||||
return 3600*12; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue