Skip to content

Commit

Permalink
update preg match & format code
Browse files Browse the repository at this point in the history
  • Loading branch information
copyrenzhe committed Jun 3, 2017
1 parent c66ef5b commit fe46468
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Repositories/Snatch/Biquge.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function repair(Novel $novel, $force)
$contents = $this->multi_send_test(self::DOMAIN . $novel->source_link . $splice_list, $this->page_size, 'utf-8');
$temp = [];
foreach ($contents as $k => $html) {
preg_match('/var readid = "(.*?)"/s', $html, $read_match);
preg_match('/addBookMark\((\d+),.*?\)/s', $html, $read_match);
if (@$read_match[1]) {
$biquge_id = $read_match[1];
$content = $this->getChapterContent($html);
Expand Down Expand Up @@ -266,7 +266,7 @@ public function update(Novel $novel)
$biquge_id = end($biquge_idChunk);
$link = $filter_list[1][$k];
$value_array[] = [
'source_link' => self::DOMAIN . $novel->source_link . $link,
'source_link' => self::DOMAIN . $link,
'name' => $name,
'content' => @$temp[$biquge_id],
'novel_id' => $novel->id,
Expand Down Expand Up @@ -349,7 +349,7 @@ public function snatch(Novel $novel)
$biquge_id = end($biquge_idChunk);
$link = $splice_list[1][$k];
$value_array[] = [
'source_link' => self::DOMAIN . $novel->source_link . $link,
'source_link' => self::DOMAIN . $link,
'name' => $name,
'content' => @$temp[$biquge_id],
'novel_id' => $novel->id,
Expand Down

0 comments on commit fe46468

Please sign in to comment.