Skip to content

Commit

Permalink
[XenForoBridge] Fix minor issues with CSS selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
logmanoriginal committed Jul 3, 2019
1 parent c0edf6e commit 50162f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bridges/XenForoBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function collectData() {
switch($this->version) {
case self::XENFORO_VERSION_1:

$titleBar = $mainContent->find('div.titleBar h1', 0)
$titleBar = $mainContent->find('div.titleBar > h1', 0)
or returnServerError('Error finding title bar!');

$this->title = $titleBar->plaintext;
Expand Down Expand Up @@ -166,7 +166,7 @@ private function extractThreadPostsV1($html, $url) {
$lang = $html->find('html', 0)->lang;

// Posts are contained in an "ol"
$messageList = $html->find('#messageList li')
$messageList = $html->find('#messageList > li')
or returnServerError('Error finding message list!');

foreach($messageList as $post) {
Expand All @@ -179,7 +179,7 @@ private function extractThreadPostsV1($html, $url) {

$item['uri'] = $url . '#' . $post->getAttribute('id');

$content = $post->find('.messageContent article', 0);
$content = $post->find('.messageContent > article', 0);

// Add some style to quotes
foreach($content->find('.bbCodeQuote') as $quote) {
Expand Down Expand Up @@ -343,7 +343,7 @@ private function extractPagesV2($html) {
}

// Manually extract baseurl and inject sentinel
$baseurl = $pageNav->find('li a', -1)->href;
$baseurl = $pageNav->find('li > a', -1)->href;
$baseurl = str_replace('page-' . $lastpage, 'page-{{sentinel}}', $baseurl);

$sentinel = '{{sentinel}}';
Expand Down

0 comments on commit 50162f5

Please sign in to comment.