@
iutopia 有的,有一个是让频道主自助提交的 @
hubhuby_bot ,还有一个自用的。都不太完善。那个自助提交的有人提交的频道里有大量的垃圾信息,我还没来得及写过滤垃圾信息的机制(懒)。自用的改天我把代码放到 github
@
smxmxf 不错不错,我写的小型 bot 有很多。照片交换 bot 、匿名聊天 bot 、视频加水印、频道中文搜索……还有一些小工具,如圆视频制作、群聊信息统计、自用的投稿 bot 等。我主要是写这个 bot 算是练手用的,没什么人玩,我也放弃推广了,随缘吧。
@
74123gzy 呃,我也不是故意视奸的,因为偶尔会发生错误,所以我看看 log ,那长段的数字引起我注意了而已。当然也不可否认我对大家在 bot 上聊什么有一些好奇,但是实际上如果不非常仔细看,大部分时候我都无法连贯的了解聊天内容。大部分时候大家都只是匹配,说 hi ,匹配,说 hi……循环。
@
name1991 用 python 有个 PytelegramBotApi 库。不用写前端,非常简单的。
@
Llesue #6 `SELECT COUNT(user_id) FROM users WHERE lang IS NOT "zh-hans" AND lang IS NOT NULL;
87` 非中文只有 87 个
@
Llesue #4 这个 bot api 的限制是群发消息一秒钟不能超过 20 个,同一个群里一分钟不允许发送超过 20 个消息。所以这个机器人其实很难触及限制
用 python 有个 PytelegramBotApi 库
直接 pve 安装一个 Debian
远程下载:安装 aria2
远程迅雷:pve 安装一个精简 win11 和迅雷
文件中间件:Debian 安装 filebrowser
局域网共享:Samba 配置
备份:rclone, aliyunpan (GitHub 搜)
@
meeop #106 试过了,内容加不到 localstorage 里……
data:text/html;charset=,<title>小小记事本</title><style>* {margin: 0 auto;box-sizing: border-box;color: gray;outline: none;border-radius: 5px;}</style><script> function copyToClipboard() { var htmlCOntent= document.documentElement.outerHTML; var tempInput = document.createElement("textarea"); tempInput.style.opacity = 0; tempInput.value = 'data:text/html;charset=,' +htmlContent; document.body.appendChild(tempInput); tempInput.select(); document.execCommand("copy"); document.body.removeChild(tempInput); alert("已复制"); } </script><body style="background: gainsboro;"><div style="display: flex; flex-direction: column; max-width: 960px;"><div style="display: flex; width: 100%; margin: 5vh 0 1.5vh;"><div style="flex: 1; font-size: 2em; font-weight: 600; padding-left: 16px; white-space: nowrap;" contenteditable>编辑标题</div><button Onclick="copyToClipboard()" style="border: 1px solid lightgray; padding: 0 20px; cursor: pointer; font-size: 1em;">复制当前页 dataUrl</button></div><div style="width: 100%; min-height: 50vh; padding: 16px; font-size: 1.2em; border: 1px dashed lightgray; background: whitesmoke; text-align: justify;" contenteditable>编辑这里开始.
会了
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" cOntent="IE=edge">
<meta name="viewport" cOntent="width=device-width, initial-scale=1.0">
<title>小小记事本</title>
<style>
* {
margin: 0 auto;
box-sizing: border-box;
color: #777777;
outline: none;
}
body {
background: #f5f5f5;
}
.main {
display: flex;
flex-direction: column;
max-width: 960px;
}
.container {
display: flex;
width: 100%;
margin: 5vh 0 1.5vh;
}
.title {
flex: 1;
font-size: 2em;
font-weight: 600;
padding-left: 16px;
white-space: nowrap;
}
.edit {
width: 100%;
min-height: 50vh;
padding: 16px;
font-size: 1.2em;
border: 1px dashed #ccc;
border-radius: 2px;
background: #fff;
}
button {
border: 1px solid #ccc;
padding: 0 20px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="main">
<div class="container">
<div class="title" contenteditable>编辑标题</div>
<button id="btn">复制当前页 dataUrl</button>
</div>
<div class="edit" contenteditable>编辑这里开始.</div>
</div&g;
<script>
function utf8_to_b64(str) {
return window.btoa(unescape(encodeURIComponent(str)));
}
// function b64_to_utf8(str) {
// return decodeURIComponent(escape(window.atob(str)));
// }
const btn = document.querySelector("#btn");
btn.addEventListener("click", () => {
const htmlCOntent= document.querySelector("html");
console.log(htmlContent.innerHTML);
const dataUrl = "<html>" + htmlContent.innerHTML + "</html>";
const base64 = utf8_to_b64(dataUrl);
// console.log(base64);
const inputValue = `data:text/html;base64,${base64}`
const input = document.createElement("input");
input.setAttribute("readonly", "readonly");
input.setAttribute("value", inputValue);
document.body.appendChild(input);
input.setSelectionRange(0, 9999);
input.select();
document.execCommand("copy");
document.body.removeChild(input);
alert('地址已复制。')
});
</script>
</body>
</html>