mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-26 19:36:52 +03:00
Correctiond e quelques boulettes, mais ca ne marche toujours pas
This commit is contained in:
parent
4f1d4137d4
commit
dbe9ae44df
1 changed files with 8 additions and 21 deletions
|
@ -5,7 +5,7 @@
|
|||
* @description Sexactu via rss-bridge
|
||||
* @update 04/02/2014
|
||||
*/
|
||||
class LesJoiesDuCodeBridge extends BridgeAbstract{
|
||||
class SexactuBridge extends BridgeAbstract{
|
||||
|
||||
public function collectData(array $param){
|
||||
$html = file_get_html('http://http://www.gqmagazine.fr/sexactu') or $this->returnError('Could not request http://www.gqmagazine.fr/sexactu.', 404);
|
||||
|
@ -13,27 +13,14 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
|
|||
foreach($html->find('div.content-holder ul li') as $element) {
|
||||
$item = new Item();
|
||||
|
||||
$titreElement = $element->find('.title-holder .article-title a');
|
||||
$titre = $titreElement->innertext
|
||||
$url = $titreElement->href;
|
||||
|
||||
$temp = $element->find('div.text-container', 0);
|
||||
$content = $temp->innertext;
|
||||
|
||||
$auteur = $element->find('div.header-holder', 0);
|
||||
$pos = strpos($auteur->innertext, "par");
|
||||
|
||||
if($pos > 0)
|
||||
{
|
||||
$auteur = trim(str_replace("*/", "", substr($auteur->innertext, ($pos + 2))));
|
||||
$item->name = $auteur;
|
||||
}
|
||||
|
||||
|
||||
$item->content .= trim($content);
|
||||
$item->uri = $url;
|
||||
$item->title = trim($titre);
|
||||
// various metadata
|
||||
$titleBock = $element->find('title-holder');
|
||||
$titleData = $titleBlock->find('article-title h2 a');
|
||||
|
||||
$item->title = trim($titleData->innertext);
|
||||
$item->uri = $titleData->href;
|
||||
$item->name = "Maïa Mazaurette";
|
||||
$item->content = $element->find('text-container')->innertext;
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue