From 30bc5179c2d150d98405109ab71dd1511ca78ce7 Mon Sep 17 00:00:00 2001 From: teromene Date: Thu, 18 Oct 2018 18:44:11 +0200 Subject: [PATCH] Fix number of fetched items. Strip the username. --- bridges/FB2Bridge.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bridges/FB2Bridge.php b/bridges/FB2Bridge.php index be8168f6..98322714 100644 --- a/bridges/FB2Bridge.php +++ b/bridges/FB2Bridge.php @@ -83,8 +83,7 @@ EOD; //Build the string for the first request $requestString = 'https://touch.facebook.com/page_content_list_view/more/?page_id=' . $pageInfo['userId'] - . '&start_cursor=1&num_to_fetch=10&surface_type=timeline'; - + . '&start_cursor=1&num_to_fetch=105&surface_type=timeline'; $fileContent = getContents($requestString); $html = $this->buildContent($fileContent); @@ -229,7 +228,7 @@ EOD; $usernameRegex = '/data-nt=\"FB:TEXT4\">(.*?)<\/div>/m'; preg_match($usernameRegex, $pageContent, $usernameMatches); if(count($usernameMatches) > 0) { - $username = $usernameMatches[1]; + $username = strip_tags($usernameMatches[1]); } else { $username = $this->getInput('u'); }