Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lairdshaw committed Feb 17, 2018
1 parent aef637b commit 0bd8362
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions classes/CFUPSBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1052,11 +1052,11 @@ static function get_qanda_s() {
),
'q_images_supported' => array(
'q' => 'Are images supported?',
'a' => 'Yes. If you check "Scrape images" (checked by default), then images are downloaded along with the posts. If not, then all relative image URLs are converted to absolute URLs, so images will display in the HTML output files so long as you are online at the time of viewing those files.',
'a' => 'Yes when scraping based on "Extract User ID"; no when scraping based on "Forum IDs". In the case of the former: if you check "Scrape images" (checked by default), then images are downloaded along with the posts. If not, then all relative image URLs are converted to absolute URLs, so images will display in the HTML output files so long as you are online at the time of viewing those files.',
),
'q_attachments_supported' => array(
'q' => 'Is the downloading of attachments supported?',
'a' => static::supports_feature_s('attachments') ? 'Yes. If you check "Scrape attachments" (checked by default), then attachments are downloaded along with the posts.' : 'In general, yes, but not yet for '.static::get_forum_type_s().' forums.',
'a' => static::supports_feature_s('attachments') ? 'Yes when scraping based on "Extract User ID"; no when scraping based on "Forum IDs". In the case of the former: if you check "Scrape attachments" (checked by default), then attachments are downloaded along with the posts.' : 'In general, yes, but not yet for '.static::get_forum_type_s().' forums.',
),
'q_why_slow' => array(
'q' => 'Why is this script so slow?',
Expand Down Expand Up @@ -1400,8 +1400,6 @@ static protected function replace_downld_file_urls_s($html, $urls) {
public function run($login_if_available = true) {

This comment has been minimized.

Copy link
@mohmed1500

mohmed1500 Jul 18, 2018

1400

$valid_protocols = (CURLPROTO_HTTP | CURLPROTO_HTTPS);

$this->output_dirname = make_output_dirname ($this->token);

$this->cookie_filename = make_cookie_filename($this->web_initiated ? $this->token : $this->settings_filename);

if ($this->dbg) $this->write_err('Set cookie_filename to "'.$this->cookie_filename.'".');
Expand Down Expand Up @@ -1840,7 +1838,7 @@ protected function scrape_topic_page() {

if (!isset($topic['title'])) {
if (!$this->skins_preg_match('topic', $html, $matches)) {
$this->write_err('Failed to match the "topic" regex - could not determine the title of the topic with ID "'.$t_keys[$this->topic_idx].'" is. The URL of the topic page is: <'.$this->last_url.'>.', __FILE__, __METHOD__, __LINE__);
$this->write_err('Failed to match the "topic" regex - could not determine the title of the topic with ID "'.$t_keys[$this->topic_idx].'". The URL of the topic page is: <'.$this->last_url.'>.', __FILE__, __METHOD__, __LINE__);
} else $topic['title'] = $matches[1];
}

Expand Down Expand Up @@ -2119,7 +2117,7 @@ protected function write_output() {

foreach ($this->get_output_variants() as $opv) {
$op_filename = make_output_filename($this->output_dirname, $opv['filename_appendix']);
if ($this->$opv['method']($op_filename)) {
if ($this->{$opv['method']}($op_filename)) {

This comment has been minimized.

Copy link
@Nguyenduongtruongtoan2020
$opts = array(
'filename' => make_output_filename('', $opv['filename_appendix']),
'description' => ($wanted_downld_files ? 'The post output listing as: ' : '').$opv['description'],
Expand All @@ -2129,7 +2127,8 @@ protected function write_output() {
$opts['url'] = make_output_filename($this->output_dirname_web, $opv['filename_appendix']);
}
$output_info[] = $opts;
}
if ($this->dbg) $this->write_err('Successfully wrote to the output file: "'.$op_filename.'".');
} else $this->write_err('Method '.__CLASS__.'->'.$opv['method'].'('.$op_filename.') returned false.', __FILE__, __METHOD__, __LINE__);
}

if ($this->web_initiated) {

This comment has been minimized.

Copy link
@mohmed1500

mohmed1500 Jul 18, 2018

gfgy

Expand Down

1 comment on commit 0bd8362

@mohmed1500
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.