From 2750443612bed50340967afb9bba2b38efcff000 Mon Sep 17 00:00:00 2001 From: Clement Desmidt Date: Fri, 29 Sep 2017 16:01:01 +0200 Subject: [PATCH] =?UTF-8?q?:truck:=20D=C3=A9place=20dans=20`Account`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lbcreposter.php | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/lbcreposter.php b/lbcreposter.php index c6071c8..a2074c7 100644 --- a/lbcreposter.php +++ b/lbcreposter.php @@ -1,32 +1,13 @@ setClient( - new \GuzzleHttp\Client([ - 'timeout' => 90, - 'verify' => false, - 'curl' => [ - CURLOPT_TIMEOUT => 60, - CURLOPT_TIMEOUT_MS => 60, - CURLOPT_CONNECTTIMEOUT => 60, - ], - 'headers' => [ - 'User-Agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0', - ], - ]) -); -$client->setMaxRedirects(10); define('APP_DIR', dirname(__FILE__)); define('DEALS_DIR', sprintf('%s/deals', APP_DIR)); $script_params = parse_ini_file(sprintf('%s/lbcreposter.ini.dev', DEALS_DIR), true); $config = new \Shikiryu\LBCReposter\Config($script_params); - -$account = new \Shikiryu\LBCReposter\Account($client, $config); -$deal = \Shikiryu\LBCReposter\Deal::fromJSON(sprintf('%s/deals/tmp/data.json', APP_DIR)); +$account = new \Shikiryu\LBCReposter\Account($client, $config); +$deal = \Shikiryu\LBCReposter\Deal::fromJSON(sprintf('%s/deals/tmp/data.json', APP_DIR)); if ($account->connect()) { // existing deals @@ -39,4 +20,4 @@ if ($account->connect()) { $account->addDeal($deal); var_dump($deals); -} \ No newline at end of file +}