|
@@ -0,0 +1,76 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App\Console\Commands;
|
|
|
+
|
|
|
+use GuzzleHttp\Cookie\SetCookie;
|
|
|
+use Illuminate\Console\Command;
|
|
|
+use GuzzleHttp\Client;
|
|
|
+use App\Modules\Book\Models\Book;
|
|
|
+use App\Modules\Book\Models\Chapter;
|
|
|
+
|
|
|
+class UpdateOuter extends Command
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * The name and signature of the console command.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ protected $signature = 'book:updateouter {--type=} {--bid=}';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The console command description.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ protected $description = 'Command description';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Create a new command instance.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function __construct()
|
|
|
+ {
|
|
|
+ parent::__construct();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Execute the console command.
|
|
|
+ *
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function handle()
|
|
|
+ {
|
|
|
+ //
|
|
|
+ }
|
|
|
+
|
|
|
+ //微月云
|
|
|
+ private function updateOneFromWyy($bid,$wyy_bid){
|
|
|
+ $jar = new \GuzzleHttp\Cookie\CookieJar(false,[
|
|
|
+ new SetCookie(['Name'=>'PHPSESSID','Value'=>'np1pu5oj2taacado7h4gn0usf2']),
|
|
|
+ new SetCookie(['Name'=>'getuserinfo','Value'=>'1']),
|
|
|
+ new SetCookie(['Name'=>'user_id','Value'=>'268860471']),
|
|
|
+ new SetCookie(['Name'=>'subscribe','Value'=>'1']),
|
|
|
+ new SetCookie(['Name'=>'user_name','Value'=>'we20190312']),
|
|
|
+ new SetCookie(['Name'=>'admin_id','Value'=>'326695218']),
|
|
|
+ new SetCookie(['Name'=>'shell','Value'=>'8de1e2d1789ed1a7a6f1673d9373123d']),
|
|
|
+ new SetCookie(['Name'=>'OPENID','Value'=>'olpZ50lR6G-pLQ8WYiQXVw6Wg8U0']),
|
|
|
+ new SetCookie(['Name'=>'VALIDON','Value'=>'1566467472']),
|
|
|
+ new SetCookie(['Name'=>'CRC','Value'=>'5e3a06c9424d5c3c80ad82371d5dec16'])
|
|
|
+ ]);
|
|
|
+ $last_chapter = Chapter::where('bid',$bid)
|
|
|
+ ->select('id','name','sequence','prev_cid','next_cid')
|
|
|
+ ->orderBy('sequence','desc')
|
|
|
+ ->first();
|
|
|
+ $now_sequence = $last_chapter->sequence+1;
|
|
|
+ $url_format = 'https://wxg6y88rwiqvjkvx.weiyueyunsc.com/ChapterContent/content/fromaid/326695218.html?bookid=%s&num=%s';
|
|
|
+ while (true){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ $url = sprintf($url_format,$wyy_bid,1);
|
|
|
+ $client = new Client();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|