[GQMagazineBridge] fix retrieve the content of an article at a given url (#2305)

This commit is contained in:
Florent Machen 2022-03-25 00:26:38 +01:00 committed by GitHub
parent 943a5e3e8b
commit 9cd8e93bb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,8 +77,6 @@ class GQMagazineBridge extends BridgeAbstract
// Since GQ don't want simple class scrapping, let's do it the hard way and ... discover content !
$main = $html->find('main', 0);
foreach ($main->find('a') as $link) {
if(strpos($link, $this->getInput('page')))
continue;
$uri = $link->href;
$date = $link->parent()->find('time', 0);
@ -117,7 +115,7 @@ class GQMagazineBridge extends BridgeAbstract
*/
private function loadFullArticle($uri){
$html = getSimpleHTMLDOMCached($uri);
return $html->find('section[data-test-id=MainContentWrapper]', 0);
return $html->find('article', 0);
}
/**