parent
59d4316ec9
commit
1ac9811d6e
|
@ -12,7 +12,8 @@
|
||||||
],
|
],
|
||||||
"require" : {
|
"require" : {
|
||||||
"php": ">=5.5.0",
|
"php": ">=5.5.0",
|
||||||
"alphayax/php_utils" : "^1.0.2",
|
"ext-curl": "*",
|
||||||
|
"alphayax/php_utils" : "^1.2.0",
|
||||||
"monolog/monolog": "^1.9.1"
|
"monolog/monolog": "^1.9.1"
|
||||||
},
|
},
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"rss": "https:\/\/www.nyaa.se\/?page=rss&user=175467",
|
"rss": "https:\/\/www.nyaa.se\/?page=rss&user=175467",
|
||||||
"pattern": "\/One_Piece.*HD.*mp4\/",
|
"pattern": "\/One_Piece.*HD.*mp4\/",
|
||||||
"last_date": 1465246874
|
"last_date": 1465755839
|
||||||
}
|
}
|
|
@ -66,11 +66,11 @@ class RestAuth extends Rest {
|
||||||
*/
|
*/
|
||||||
protected function checkResponse(){
|
protected function checkResponse(){
|
||||||
$response = $this->getCurlResponse();
|
$response = $this->getCurlResponse();
|
||||||
|
$request = explode( "\r\n", $this->curlGetInfo['request_header'])[0] . PHP_EOL;
|
||||||
echo ">> ". explode( "\r\n", $this->_curl_getinfo['request_header'])[0] . PHP_EOL;
|
// echo ">> $request";
|
||||||
|
|
||||||
if( false === $this->getSuccess()){
|
if( false === $this->getSuccess()){
|
||||||
$request = explode( PHP_EOL, @$this->_curl_getinfo['request_header'])[0];
|
/*
|
||||||
switch( $response['error_code']){
|
switch( $response['error_code']){
|
||||||
case 'invalid_request' :
|
case 'invalid_request' :
|
||||||
$a = new alphayax\freebox\Exception\InvalidRequestException();
|
$a = new alphayax\freebox\Exception\InvalidRequestException();
|
||||||
|
@ -81,6 +81,7 @@ class RestAuth extends Rest {
|
||||||
echo PHP_EOL . '---' . PHP_EOL;
|
echo PHP_EOL . '---' . PHP_EOL;
|
||||||
throw $a;
|
throw $a;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
throw new \Exception( $request .' - '. $response['msg'] . ' ('. $response['error_code'] . ')');
|
throw new \Exception( $request .' - '. $response['msg'] . ' ('. $response['error_code'] . ')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue