1
0
Fork 0
forked from blallo/rss-bridge

Update LegifranceJOBridge.php

This commit is contained in:
lalannev 2018-01-09 14:57:17 +01:00 committed by GitHub
parent 9e0565c655
commit 5a763aee8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,10 +42,10 @@ class LegifranceJOBridge extends BridgeAbstract {
$html = getSimpleHTMLDOM(self::URI) $html = getSimpleHTMLDOM(self::URI)
or $this->returnServer('Unable to download ' . self::URI); or $this->returnServer('Unable to download ' . self::URI);
$this->author = trim($html->find('h2.title', 0)->plaintext); $this->author = trim($html->find('h2.titleJO', 0)->plaintext);
$uri = $html->find('h2.titleELI', 0)->plaintext; $uri = $html->find('h2.titleELI', 0)->plaintext;
$this->uri = trim(substr($uri, strpos($uri, 'https'))); $this->uri = trim(substr($uri, strpos($uri, 'https')));
$this->timestamp = strtotime(substr($this->uri, strpos($this->uri, 'eli/jo/') + strlen('eli/jo/'))); $this->timestamp = strtotime(substr($this->uri, strpos($this->uri, 'eli/jo/') + strlen('eli/jo/'), -5));
foreach($html->find('h3') as $section) { foreach($html->find('h3') as $section) {
$subsections = $section->nextSibling()->find('h4'); $subsections = $section->nextSibling()->find('h4');