From 90d2d2086948781e9c8d3d4f8a3b01d8c942906a Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Wed, 1 Jul 2020 21:12:47 +0800 Subject: =?UTF-8?q?=F0=9F=92=A9=20Perf:=20=E8=BF=BD=E7=95=AA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BC=BA=E5=88=B6=20https=20=E5=B9=B6=E5=B0=86?= =?UTF-8?q?=E6=AF=8F=E9=A1=B5=E7=95=AA=E5=89=A7=E6=95=B0=E9=87=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=88=B0=2012?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *Needs to be improved. --- bangumi.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bangumi.php b/bangumi.php index 6acff05..00b356e 100755 --- a/bangumi.php +++ b/bangumi.php @@ -53,7 +53,7 @@ function getSubstr($str, $leftStr, $rightStr) if ($this->fields->uid == !'' && $this->fields->sessdata == !'') { if (empty($_GET['page']) || $_GET['page'] == 0) $page = 1; else $page = $_GET['page']; $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, 'https://api.bilibili.com/x/space/bangumi/follow/list?type=1&follow_status=0&vmid=' . $this->fields->uid . '&ps=16&pn=' . $page); + curl_setopt($curl, CURLOPT_URL, 'https://api.bilibili.com/x/space/bangumi/follow/list?type=1&follow_status=0&vmid=' . $this->fields->uid . '&ps=12&pn=' . $page); curl_setopt($curl, CURLOPT_COOKIE, 'SESSDATA=' . $this->fields->sessdata . ';'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $str = curl_exec($curl); @@ -66,6 +66,9 @@ if ($this->fields->uid == !'' && $this->fields->sessdata == !'') { $bgmlist = array(); } +//force https +$bangumi_cover = str_replace("http://", "https://", $bangumi['cover']); + // Uncomment for debugging /* if ($_GET['dbg'] == 'format') { @@ -96,7 +99,7 @@ if ($_GET['dbg'] == 'rawlist') { $load_image = $db->fetchAll($db->select('value')->from('table.options')->where('name = %s', "theme:Miracles")->limit(1)); $load_image = explode("\";", explode("\"", explode("\"loading_image\";", $load_image[0]["value"], 2)[1], 2)[1], 2)[0]; ?> " referrerpolicy="no-referrer">

@@ -162,7 +165,7 @@ if ($_GET['dbg'] == 'rawlist') {
- 16): ?> + 12): ?>
@@ -177,4 +180,4 @@ if ($_GET['dbg'] == 'rawlist') { ?> need('includes/footer.php'); -?> \ No newline at end of file +?> -- cgit v1.2.3