コミットを比較

...

2 コミット

作成者 SHA1 メッセージ 日付
守矢諏訪子 eeba0ae9d8 spliti 1.1.1 2023-09-09 21:43:01 +09:00
守矢諏訪子 1609cde8b8 ごめん 2023-09-09 21:30:13 +09:00
3個のファイルの変更10行の追加3行の削除

ファイルの表示

@ -1,3 +1,8 @@
# 1.1.1
* YouTube動画があれば、オワコンYouTubeに変更させる様に
* サムネイルがなければ、getimg()関数をす部に終了する様に
* もっと小さいバグを修正
# 1.1.0
* 画像はimgproxy化
* カテゴリーを追加

ファイルの表示

@ -1,4 +1,4 @@
<?php
define("DOMAIN", "https://mixi.owacon.moe");
define("IMGPROXY", "https://imgproxy.owacon.moe");
define("IMGPROXY", "https://imgproxy.076.moe");
?>

ファイルの表示

@ -4,11 +4,12 @@
/* ページのタイトル */
function gettitle (string $str): string {
preg_match("/<title>(.*)<\/title>/", $str, $matches);
return $matches[1];
return isset($matches[1]) ? $matches[1] : "";
}
function getimg (string $str): string {
preg_match('/<img class="NEWS_tempPhoto__picture" src="(.*)" alt="">/', $str, $matches);
if (!isset($matches[1])) return "";
$res = str_replace("https://", IMGPROXY."/", $matches[1]);
unset($matches);
return $res;
@ -79,6 +80,7 @@
$res = preg_replace('/<table>(.*?)<\/table>/s', "", $res);
$res = preg_replace('/<div class="adsense0(.*?)<\/div>/s', "", $res);
$res = preg_replace('/<div class="adsense(.*?)<\/div>/s', "", $res);
$res = preg_replace('/(www.?)youtube.com/s', "youtube.owacon.moe", $res);
$res = preg_replace('/<div class="subInfo">(.*?)<\/div>/s', "", $res);
$res = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $res);
$res = str_replace("<!--article_image-->", "", $res);
@ -150,7 +152,7 @@
<body>
<?= $out["content"] ?>
<p class="footer">
Spliti 1.1.0 |
Spliti 1.1.1 |
<a href="https://gitler.moe/suwako/spliti"><img src="/git.png" alt="Git"></a> |
<a href="https://076.moe/"></a>
</p>