mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Hopefuly fix scraping
This commit is contained in:
@@ -343,14 +343,14 @@ class IRCClient
|
||||
$this->_pong($matches[1]);
|
||||
} elseif (preg_match('/^:(.*?)\s+(\d+).*?(:.+?)?$/', $this->_buffer, $matches)) {
|
||||
// We found 001, which means we are logged in.
|
||||
if ($matches[2] == 001) {
|
||||
if ((int) $matches[2] === 1) {
|
||||
$this->_remote_host_received = $matches[1];
|
||||
break;
|
||||
|
||||
// We got 464, which means we need to send a password.
|
||||
}
|
||||
|
||||
if ($matches[2] == 464) {
|
||||
if ((int)$matches[2] === 464) {
|
||||
// Before the lower check, set the password : username:password
|
||||
$tempPass = $userName.':'.$password;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Blacklight;
|
||||
|
||||
use App\Models\Group;
|
||||
use App\Models\Predb;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
@@ -219,7 +220,9 @@ class IRCScraper extends IRCClient
|
||||
return;
|
||||
}
|
||||
|
||||
$this->_curPre['predate'] = 'FROM_UNIXTIME((strtotime($matches["time"]." UTC")))';
|
||||
$utime = Carbon::createFromTimeString($matches['time'], 'UTC')->timestamp;
|
||||
|
||||
$this->_curPre['predate'] = 'FROM_UNIXTIME('.$utime.')';
|
||||
$this->_curPre['title'] = $matches['title'];
|
||||
$this->_curPre['source'] = $matches['source'];
|
||||
if ($matches['category'] !== 'N/A') {
|
||||
|
||||
Reference in New Issue
Block a user