-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
197 lines (103 loc) · 85.5 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>兔兔博客🇨🇳</title>
<link href="https://blog.tutuxka.eu.org/atom.xml" rel="self"/>
<link href="https://blog.tutuxka.eu.org/"/>
<updated>2024-10-05T11:11:09.487Z</updated>
<id>https://blog.tutuxka.eu.org/</id>
<author>
<name>兔兔博客🇨🇳</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>国庆爬个明日方舟立绘并搭建api</title>
<link href="https://blog.tutuxka.eu.org/posts/ee601c8a.html"/>
<id>https://blog.tutuxka.eu.org/posts/ee601c8a.html</id>
<published>2024-10-05T10:51:53.871Z</published>
<updated>2024-10-05T11:11:09.487Z</updated>
<content type="html"><![CDATA[<p>大家国庆快乐呀,写了个爬虫送给大家</p><hr><p>先感谢着几位大佬🍭<br><a href="https://noionion.top/53760.html">新年前爬个明日方舟的立绘</a><br><a href="https://www.heart-of-engine.top/posts/fccf.html">明日方舟干员立绘爬虫</a><br><a href="https://blog.sukiu.top/Mixed/Random-Image-Worker/">CloudFlare Worker搭建随机图片API</a><br>无意间刷到了<a href="https://noionion.top/">大佬</a>的博客,看到了这个明日方舟的立绘挺有意思的,想直接抄作业,但奈何代码失效了,就自己改了一下,发出来记录一下</p><hr><p>看了一下,应该是后面爬链接的那一块失效了,原文是这样的"<strong>给的是 /images/thumb/6/65/%E7%AB%8B%E7%BB%98_%E5%87%AF%E5%B0%94%E5%B8%8C_2.png ,我要的是这个 <a href="http://prts.wiki/images/6/65/%E7%AB%8B%E7%BB%98_%E5%87%AF%E5%B0%94%E5%B8%8C_2.png">http://prts.wiki/images/6/65/立绘_凯尔希_2.png</a> 嘛!</strong>”<br>现在应该是更新了,给的链接是<strong><a href="https://prts.wiki/w/%E6%96%87%E4%BB%B6:%E7%AB%8B%E7%BB%98_12F_1.png">https://prts.wiki/w/文件:立绘_12F_1.png</a></strong>,但需要的是<strong><a href="https://media.prts.wiki/6/61/%E7%AB%8B%E7%BB%98_12F_1.png">https://media.prts.wiki/6/61/立绘_12F_1.png</a></strong></p><p>现在完全牛头不对马嘴嘛🌚</p><hr><p>所以研究了一下之后,感觉应该可以<br>我就直接上代码了</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 引入程序需要的相应包(类似C语言中的# include<stdio.h> 、include<math.h>等)</span></span><br><span class="line"><span class="keyword">import</span> os</span><br><span class="line"><span class="keyword">from</span> bs4 <span class="keyword">import</span> BeautifulSoup</span><br><span class="line"><span class="keyword">import</span> time</span><br><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置爬取图片的网址</span></span><br><span class="line">url = <span class="string">"http://prts.wiki/index.php?title=%E7%89%B9%E6%AE%8A:%E6%90%9C%E7%B4%A2&limit=500&offset=0&profile=images&search=%E7%AB%8B%E7%BB%98"</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 重定义请求头,防止被网页发现是爬虫,从而进行反爬操作</span></span><br><span class="line">headers = {</span><br><span class="line"> <span class="string">"Cookie"</span>: <span class="string">"arccount62298=c; arccount62019=c"</span>,</span><br><span class="line"> <span class="string">"User-Agent"</span>: <span class="string">"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.66"</span></span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 爬取模块</span></span><br><span class="line">html = requests.get(url, headers=headers) <span class="comment">## 这里是使用requests函数用之前重定义的请求头读取网页信息</span></span><br><span class="line"><span class="comment">### 测试代码</span></span><br><span class="line"><span class="comment">### print(html.text)</span></span><br><span class="line">html.encoding = html.apparent_encoding <span class="comment">## encoding是从http中的header中的charset字段中提取的编码方式,若header中没有charset字段则默认为ISO-8859-1编码模式,无法解析中文,这是乱码的原因,apparent_encoding会从网页的内容中分析网页编码的方式,所以apparent_encoding比encoding更加准确,当网页出现乱码时可以把apparent_encoding的编码格式赋值给encoding。</span></span><br><span class="line">soup = BeautifulSoup(html.text, <span class="string">"html.parser"</span>) <span class="comment">## "html.parser"是为了让解析速度快,容错率高,具体讲解网址为https://blog.csdn.net/yangjiajia123456/article/details/80959896</span></span><br><span class="line"><span class="built_in">list</span> = soup.find_all(class_ = <span class="string">"searchResultImage"</span>) <span class="comment">## 注一:对爬取页面进行“检查”操作后发现,所有的图片都包含在一个<table class="searchResultImage">的class中,所以这行代码的作用是查找html代码中标签为class且值为searchRusultImgge的所有代码块</span></span><br><span class="line"><span class="comment">### 测试代码</span></span><br><span class="line"><span class="comment">### print(list)</span></span><br><span class="line"><span class="comment">### 可以看到,相比于html.text,list里没有大量的网页配置信息,只有以图片名称为核心的列表</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 检查项目文件夹下是否有“Arknights”这个文件夹,没有的话新建一个,有的话就不新建了</span></span><br><span class="line"><span class="keyword">try</span>:</span><br><span class="line"> os.mkdir(<span class="string">"./Arknights"</span>) <span class="comment">## 注二:创建文件夹(这个文件夹创建在现在的项目文件夹里,比方说我这里用的是“明日方舟干员立绘项目”项目文件夹,爬取到的图片就存在“明日方舟干员立绘项目”项目文件夹下的“Arknights”文件夹里,该函数具体介绍网址为https://blog.csdn.net/qq_20412595/article/details/82423764)</span></span><br><span class="line"> <span class="comment">## 项目文件夹默认在代码存放的地方,如果你放在桌面,那后面生成的Arknights文件夹就在桌面</span></span><br><span class="line"><span class="keyword">except</span>:</span><br><span class="line"> <span class="keyword">pass</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 将当前工作路径切换为“Arknights”这个文件夹</span></span><br><span class="line">os.chdir(<span class="string">"./Arknights"</span>) <span class="comment">## 切换当前工作路径(本函数的具体介绍在https://www.runoob.com/python3/python3-os-chdir.html)</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 将最初读取的图片设置为第一张图片</span></span><br><span class="line">num=<span class="number">0</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 测试用参数</span></span><br><span class="line"><span class="comment"># num1 = 0</span></span><br><span class="line"><span class="comment"># num2 = 0</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 图片的爬取与本地存储</span></span><br><span class="line"><span class="keyword">for</span> s <span class="keyword">in</span> <span class="built_in">list</span>:</span><br><span class="line"> string = <span class="built_in">str</span>(s) <span class="comment">## 将list中的单个元素化为字符串,再针对该字符串进行处理</span></span><br><span class="line"></span><br><span class="line"> namebegin = string.find(<span class="string">'title="文件'</span>) <span class="comment">## 注三:显然,所有立绘的文件名开头都有“文件”二字,找到“文件”二字就相当于找到了立绘 注四:为了读取图片里包含的干员名,我们发现能够通过title入手,向后搜索名称,这里找到了"title"中"t”的位置</span></span><br><span class="line"> <span class="comment"># name_point_1 = namebegin+12 ## 为了读取干员名称,我们这里找到第一个空格的位置name_point_1(这里空格刚好在namebegin后的第二格)</span></span><br><span class="line"> <span class="comment"># name_point_2 = string.find(' 1'or' 2'or' skin') ## 这里找到第二个空格的位置name_point_2(本方法返回值远小于namebegin的数值,是错误的)</span></span><br><span class="line"> nameend = string[namebegin:].find(<span class="string">'png'</span>) <span class="comment">## 找到图片文件名末尾的"png"字样对应的位置</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">## 测试代码</span></span><br><span class="line"> <span class="comment"># print(namebegin)</span></span><br><span class="line"> <span class="comment"># print(name_point_1)</span></span><br><span class="line"> <span class="comment"># print(name_point_2)</span></span><br><span class="line"> <span class="comment"># print(nameend)</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">## 这里如果使用name_point_2 = string.find(' 1'or' 2'or' skin'),会显示位置为54,远小于namebegin的位置值,是错误的,所以用这种方法难以找到第二个空格的位置,所以我们将"干员名 1/2/skin(b/_V).png"整体令为name1,再在name1里寻找空格位置</span></span><br><span class="line"> name1 = string[namebegin+<span class="number">13</span>:namebegin+nameend-<span class="number">1</span>]</span><br><span class="line"> name1begin = name1.find(<span class="string">'"干员名"'</span>)</span><br><span class="line"> name1_point_1 = name1begin</span><br><span class="line"> name1_point_2 = name1.find(<span class="string">' 1'</span><span class="keyword">or</span><span class="string">' 2'</span><span class="keyword">or</span><span class="string">' skin'</span>) <span class="comment">## 根据测试代码我们有,输出结果为-1,即name1[name1begin]对应于name1的最后一个字符</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 测试代码</span></span><br><span class="line"> <span class="comment"># print(name1) # 输出结果格式"暗索 skin1 V1"</span></span><br><span class="line"> <span class="comment"># print(name1begin)</span></span><br><span class="line"> <span class="comment"># print(name1[name1begin])</span></span><br><span class="line"> <span class="comment"># print(name1_point_1)</span></span><br><span class="line"> <span class="comment"># print(name1_point_2)</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># print(string[(namebegin+nameend-3):(namebegin+nameend-1)]) ## 本代码用来查看后两位并进行检验</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span>(string[namebegin+nameend-<span class="number">3</span>:namebegin+nameend-<span class="number">1</span>] <span class="keyword">in</span> [<span class="string">'V1'</span>,<span class="string">'V2'</span>]): <span class="comment">## 若后两位为V1或V2</span></span><br><span class="line"> <span class="comment"># num1+=1</span></span><br><span class="line"> <span class="comment"># print('num1={}'.format(num1))</span></span><br><span class="line"> <span class="keyword">continue</span></span><br><span class="line"> <span class="keyword">elif</span>(string[namebegin+nameend-<span class="number">2</span>:namebegin+nameend-<span class="number">1</span>]==<span class="string">'b'</span>): <span class="comment">## 若最后一位为b</span></span><br><span class="line"> <span class="comment"># num2+=1</span></span><br><span class="line"> <span class="comment"># print('num2={}'.format(num2))</span></span><br><span class="line"> <span class="keyword">continue</span></span><br><span class="line"> <span class="keyword">else</span>:</span><br><span class="line"> name1 = name1 + <span class="string">'.png'</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 测试代码</span></span><br><span class="line"> <span class="comment"># print(name1)</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 修改文件名称</span></span><br><span class="line"> name1 = name1.replace(<span class="string">" "</span>,<span class="string">"_"</span>) <span class="comment">## 将图片文件名里的空格转为”_“</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 设置显示的链接名</span></span><br><span class="line"> urlbegin = string.find(<span class="string">'https://media.prts.wiki/thumb/'</span>)</span><br><span class="line"> <span class="keyword">if</span> urlbegin != -<span class="number">1</span>:</span><br><span class="line"> urlend = string.find(<span class="string">'.png'</span>, urlbegin)</span><br><span class="line"> imgurl_suffix = string[urlbegin+<span class="number">30</span>:urlend+<span class="number">4</span>] <span class="comment"># 获取https://media.prts.wiki/thumb/后面的内容</span></span><br><span class="line"> imgurl = <span class="string">'https://media.prts.wiki/'</span> + imgurl_suffix</span><br><span class="line"> <span class="comment"># 爬取图片</span></span><br><span class="line"> img = requests.get(imgurl, headers=headers).content</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 测试代码</span></span><br><span class="line"> <span class="comment"># print(name1)</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 图片写入本地文件夹</span></span><br><span class="line"> <span class="keyword">if</span>(name1 <span class="keyword">not</span> <span class="keyword">in</span> [<span class="string">'精二立绘A.png'</span>,<span class="string">'Pith_2.png'</span>,<span class="string">'Sharp_2.png'</span>,<span class="string">'Stormeye_2.png'</span>,<span class="string">'Touch_2.png'</span>,<span class="string">'阿米娅(近卫)_2.png'</span>]): <span class="comment">## 为了不读取”精二立绘A“与五位特殊干员(前面博文有说到)的图片,专门做了一个循环(其实爬取后再直接寻找删除也可以)</span></span><br><span class="line"> <span class="comment">## 经过noionion大佬的提示,or的优先级不高,所以不能用if(name1 != '精二立绘A.png' or 'Pith_2.png' or 'Sharp_2.png' or 'Stormeye_2.png' or 'Touch_2.png' or '阿米娅(近卫)_2.png'):写法</span></span><br><span class="line"> <span class="comment">## 他还建议我对列表进行硬操作,而不是用!=这种逻辑运算符(说可能会炸,我慌的一批)</span></span><br><span class="line"> <span class="comment">## 所以我去除了if(name1 != ('精二立绘A.png' or 'Pith_2.png' or 'Sharp_2.png' or 'Stormeye_2.png' or 'Touch_2.png' or '阿米娅(近卫)_2.png')),改用全新的判断语法</span></span><br><span class="line"> <span class="keyword">with</span> <span class="built_in">open</span>(name1, <span class="string">'wb'</span>) <span class="keyword">as</span> f:</span><br><span class="line"> f.write(img) <span class="comment">## 将爬取到的图片写入“Arknights”这个文件夹里</span></span><br><span class="line"> num+=<span class="number">1</span> <span class="comment">## num=num+1,使得下面print函数里的”已爬取{}张“中的{}对应数值加1</span></span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"已爬取{}张,图片名称为:{},链接为:{}"</span>.<span class="built_in">format</span>(num,name1,imgurl)) <span class="comment">## 这里{}的意义与C语言中的"%d"/"%f"十分相近,是从format()函数里读取对应位置的参数</span></span><br><span class="line"> <span class="comment"># "r"--以读方式打开,只能读文件,如果文件不存在,会发生异常</span></span><br><span class="line"> <span class="comment"># "w"--以写方式打开,只能写文件,如果文件不存在,创建该文件;如果文件已存在,先清空,再打开文件</span></span><br><span class="line"> <span class="comment"># "rb"--以二进制读方式打开,只能读文件,如果文件不存在,会发生异常</span></span><br><span class="line"> <span class="comment"># "wb"--以二进制写方式打开,只能写文件,如果文件不存在,创建该文件;如果文件已存在,先清空,再打开文件(所以这个程序就算运行多次,文件夹里也不会出现重复的立绘)</span></span><br><span class="line"> time.sleep(<span class="number">1</span>) <span class="comment">## 休息一秒后爬取下一张图片,这个函数在链接https://blog.csdn.net/weixin_45949073/article/details/104989562里讲得很清楚</span></span><br></pre></td></tr></table></figure><p>这里参照了<a href="https://www.heart-of-engine.top/posts/fccf.html">https://www.heart-of-engine.top/posts/fccf.html</a>的代码,小小改动了一点,成功运行起来了🌝</p><hr><p>后面由于想做成随机图片api所以就用CloudFlare Worker搭建了<br>直接上教程了</p><hr><p>图片转 Webp<br>这步骤可选,转换为 webp 格式后,图片体积压缩而分辨率不变,可以更快地加载。</p><p>为了在引用时方便,先把名称按 1、2、3…顺序标号,再通过 PIL 库,将 jpg 和 png 格式的图片转换成 webp。</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> os</span><br><span class="line"><span class="keyword">from</span> PIL <span class="keyword">import</span> Image</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">rename_and_convert_images</span>(<span class="params">directory</span>):</span><br><span class="line"> <span class="comment"># 获取目录中的所有文件</span></span><br><span class="line"> files = os.listdir(directory)</span><br><span class="line"> <span class="comment"># 过滤出 png 和 webp 格式的文件</span></span><br><span class="line"> png_files = [f <span class="keyword">for</span> f <span class="keyword">in</span> files <span class="keyword">if</span> f.lower().endswith(<span class="string">'.png'</span>)]</span><br><span class="line"> webp_files = [f <span class="keyword">for</span> f <span class="keyword">in</span> files <span class="keyword">if</span> f.lower().endswith(<span class="string">'.webp'</span>)]</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 找到现有的最大序号</span></span><br><span class="line"> max_index = <span class="number">0</span></span><br><span class="line"> <span class="keyword">for</span> f <span class="keyword">in</span> webp_files:</span><br><span class="line"> <span class="keyword">try</span>:</span><br><span class="line"> index = <span class="built_in">int</span>(os.path.splitext(f)[<span class="number">0</span>])</span><br><span class="line"> <span class="keyword">if</span> index > max_index:</span><br><span class="line"> max_index = index</span><br><span class="line"> <span class="keyword">except</span> ValueError:</span><br><span class="line"> <span class="keyword">continue</span></span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 按顺序重命名文件并转换格式</span></span><br><span class="line"> <span class="keyword">for</span> index, filename <span class="keyword">in</span> <span class="built_in">enumerate</span>(png_files, start=max_index + <span class="number">1</span>):</span><br><span class="line"> <span class="comment"># 构建新的文件名</span></span><br><span class="line"> new_filename = <span class="string">f"<span class="subst">{index}</span>.webp"</span></span><br><span class="line"> <span class="comment"># 构建完整的文件路径</span></span><br><span class="line"> old_filepath = os.path.join(directory, filename)</span><br><span class="line"> new_filepath = os.path.join(directory, new_filename)</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 打开图像并转换为 webp 格式</span></span><br><span class="line"> <span class="keyword">with</span> Image.<span class="built_in">open</span>(old_filepath) <span class="keyword">as</span> img:</span><br><span class="line"> img.save(new_filepath, <span class="string">'webp'</span>)</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 删除原始文件</span></span><br><span class="line"> os.remove(old_filepath)</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">f"Converted <span class="subst">{filename}</span> to <span class="subst">{new_filename}</span>"</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 使用示例</span></span><br><span class="line">directory = <span class="string">'./Arknights'</span> <span class="comment"># 替换为你的目录路径</span></span><br><span class="line">rename_and_convert_images(directory)</span><br></pre></td></tr></table></figure><hr><p>文件上传 Github<br>这步骤不具体说了,图片通过 <em>jsdeliver</em> 引用。</p><hr><p>CloudFlare Worker<br>新建一个 worker,代码参考如下:</p><p>+因为改了文件名,所以下面只需要修改图片总数 total,就能生成一个随机数访问<br>+个人通过 type 区别宽屏和竖屏图片,自己按需修改</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line"><span class="title function_">addEventListener</span>(<span class="string">'fetch'</span>, <span class="function"><span class="params">event</span> =></span> {</span><br><span class="line"> event.<span class="title function_">respondWith</span>(</span><br><span class="line"> <span class="title function_">handleRequest</span>(event.<span class="property">request</span>).<span class="title function_">catch</span>(<span class="function">(<span class="params">err</span>) =></span></span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Response</span>(<span class="string">'cfworker error:\n'</span> + err.<span class="property">stack</span>, {</span><br><span class="line"> <span class="attr">status</span>: <span class="number">502</span>,</span><br><span class="line"> })</span><br><span class="line"> )</span><br><span class="line"> );</span><br><span class="line">});</span><br><span class="line"></span><br><span class="line"><span class="keyword">async</span> <span class="keyword">function</span> <span class="title function_">handleRequest</span>(<span class="params">request</span>) {</span><br><span class="line"> <span class="keyword">const</span> url = <span class="keyword">new</span> <span class="title function_">URL</span>(request.<span class="property">url</span>);</span><br><span class="line"> <span class="keyword">switch</span> (url.<span class="property">pathname</span>) {</span><br><span class="line"> <span class="keyword">case</span> <span class="string">"/img"</span>:</span><br><span class="line"> <span class="keyword">var</span> type = url.<span class="property">searchParams</span>.<span class="title function_">has</span>(<span class="string">"type"</span>) ? url.<span class="property">searchParams</span>.<span class="title function_">get</span>(<span class="string">"type"</span>) : <span class="string">"pc"</span>;</span><br><span class="line"> <span class="keyword">const</span> total = <span class="title function_">getTotal</span>(type);</span><br><span class="line"> <span class="keyword">if</span> (total == <span class="number">0</span>) <span class="keyword">return</span> <span class="title function_">handleImage</span>(<span class="string">"pc"</span>, <span class="title function_">getTotal</span>(<span class="string">"pc"</span>));</span><br><span class="line"> <span class="keyword">return</span> <span class="title function_">handleImage</span>(type, total);</span><br><span class="line"> <span class="keyword">case</span> <span class="string">"/favicon.ico"</span>:</span><br><span class="line"> <span class="keyword">return</span> <span class="title function_">fetch</span>(<span class="string">"https://gcore.jsdelivr.net/gh/SukiEva/assets/blog/favicon.ico"</span>);</span><br><span class="line"> <span class="attr">default</span>:</span><br><span class="line"> <span class="keyword">return</span> <span class="title function_">handleNotFound</span>();</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">getTotal</span>(<span class="params">type</span>) {</span><br><span class="line"> <span class="keyword">switch</span> (type) {</span><br><span class="line"> <span class="keyword">case</span> <span class="string">"pc"</span>: <span class="keyword">return</span> <span class="number">175</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">"mb"</span>: <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> <span class="attr">default</span>: <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">async</span> <span class="keyword">function</span> <span class="title function_">handleImage</span>(<span class="params">type, total</span>) {</span><br><span class="line"> <span class="keyword">var</span> index = <span class="title class_">Math</span>.<span class="title function_">floor</span>((<span class="title class_">Math</span>.<span class="title function_">random</span>() * total)) + <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">var</span> img = <span class="string">"https://gcore.jsdelivr.net/gh/SukiEva/assets/webp/"</span> + type + <span class="string">"/"</span> + index + <span class="string">".webp"</span>;</span><br><span class="line"> res = <span class="keyword">await</span> <span class="title function_">fetch</span>(img);</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Response</span>(res.<span class="property">body</span>, {</span><br><span class="line"> <span class="attr">headers</span>: {</span><br><span class="line"> <span class="string">'content-type'</span>: <span class="string">'image/webp'</span>,</span><br><span class="line"> },</span><br><span class="line"> });</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">handleNotFound</span>(<span class="params"></span>) {</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Response</span>(<span class="string">'Not Found'</span>, {</span><br><span class="line"> <span class="attr">status</span>: <span class="number">404</span>,</span><br><span class="line"> });</span><br><span class="line">}</span><br></pre></td></tr></table></figure><hr><p>自定义域名<br>默认是一个 CF 的域名,但是目前已经被国内 ban 了,需要自行添加域名路由。</p><p>最后再次祝看到这篇博客的小伙伴:</p><h2 id="2024,国庆快乐鸭">2024,国庆快乐鸭!</h2><p>在小小的洞里爬呀爬呀爬( 逃</p>]]></content>
<summary type="html">这篇文章介绍了作者为大家准备了一份国庆礼物——一个爬虫程序,并感谢了一些大佬。作者在新年前要爬取一些数据,并希望能和大家一起进步。</summary>
<category term="爬虫" scheme="https://blog.tutuxka.eu.org/tags/%E7%88%AC%E8%99%AB/"/>
<category term="Worker" scheme="https://blog.tutuxka.eu.org/tags/Worker/"/>
</entry>
<entry>
<title>Markdown 基本语法</title>
<link href="https://blog.tutuxka.eu.org/posts/7894e390.html"/>
<id>https://blog.tutuxka.eu.org/posts/7894e390.html</id>
<published>2024-10-02T07:09:37.870Z</published>
<updated>2024-10-02T07:10:13.078Z</updated>
<content type="html"><![CDATA[<p>既然是一门语言,就会有语法规范。Markdown 的基础语法十分简单,保证你几分钟就可以掌握。</p><h3 id="2-1-标题">2.1. 标题</h3><p>使用 <code>#</code>,可以表示 1-6 级标题。</p><blockquote><p># 一级标题</p><p>## 二级标题</p><p>### 三级标题</p><p>#### 四级标题</p><p>##### 五级标题</p><p>###### 六级标题</p></blockquote><p>效果:</p><blockquote><h1>一级标题</h1><h2 id="二级标题">二级标题</h2><h3 id="三级标题">三级标题</h3><h4 id="四级标题">四级标题</h4><h5 id="五级标题">五级标题</h5><h6 id="六级标题">六级标题</h6></blockquote><h3 id="2-2-区块引用">2.2. 区块引用</h3><p>在段落的每行或者只在第一行使用符号>,还可使用多个嵌套引用,如:</p><blockquote><p>> 区块引用</p><p>>> 嵌套引用</p></blockquote><p>效果:</p><blockquote><p>区块引用</p><blockquote><p>嵌套引用</p></blockquote></blockquote><h3 id="2-3-代码区块">2.3. 代码区块</h3><p>代码区块的建立是在每行加上4个空格或者一个制表符(如同写代码一样)。</p><p>如果你只想高亮语句中的某个函数名或关键字,可以使用反引号 <code>函数名</code> 实现。</p><p>通常编辑器根据代码片段适配合适的高亮方法,但你也可以用 3 个 ` 包裹一段代码,并指定一种语言,如:</p><blockquote><p>普通段落:</p><p>```c(指定以下代码为 C 语言)</p><p>void main()</p><p>{</p><p>printf(“Hello, Markdown!”);</p><p>}</p><p>```</p></blockquote><p>代码区块:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="type">void</span> <span class="title function_">main</span><span class="params">()</span></span><br><span class="line">{</span><br><span class="line"> <span class="built_in">printf</span>(<span class="string">"Hello, Markdown!"</span>);</span><br><span class="line">}</span><br></pre></td></tr></table></figure><h3 id="2-4-强调(加粗、斜体)">2.4. 强调(加粗、斜体)</h3><p>在强调内容两侧分别加上 1 个 <code>*</code> 或者 <code>_</code>,如:</p><blockquote><p>*斜体*,_斜体_</p><p>*<em>粗体</em>*,_<em>粗体</em>_</p></blockquote><p>效果:</p><blockquote><p><em>斜体</em>,<em>斜体</em></p><p><strong>粗体</strong>,<strong>粗体</strong></p></blockquote><h3 id="2-5-删除线">2.5. 删除线</h3><p>使用双波浪线 ~~ 将需要删除线的文本括起来,如:</p><blockquote><p>~~删除线~~</p></blockquote><p>效果:</p><blockquote><p><s>删除线</s></p></blockquote><h3 id="2-6-无序列表">2.6. 无序列表</h3><p>使用 <code>·</code>、<code>+</code>、或 <code>-</code> 标记无序列表,如:</p><blockquote><p>- 第一项</p><p>- 第二项</p><p>- 第三项</p></blockquote><p>效果:</p><blockquote><ul><li>第一项</li><li>第二项</li><li>第三项</li></ul></blockquote><h3 id="2-7-有序列表">2.7. 有序列表</h3><p>有序列表的标记方式是将上述的符号换成数字,并辅以 <code>.</code>,如:</p><blockquote><p>1. 第一项</p><p>2. 第二项</p><p>3. 第三项</p></blockquote><p>效果:</p><blockquote><ol><li>第一项</li><li>第一项</li><li>第一项</li></ol></blockquote><h3 id="2-8-分割线">2.8. 分割线</h3><p>分割线最常使用就是三个或以上 <code>*</code>,还可以使用 <code>-</code> 和 <code>_</code>,如:</p><blockquote><p>***</p><p>—</p><p>___</p></blockquote><p>效果:</p><blockquote><p>注意: 分割线与之前的内容要用空行。</p></blockquote><h3 id="2-9-链接">2.9. 链接</h3><p>链接使用方法是 <code>[链接名称](链接地址)</code>,如:</p><blockquote><p>这是 GitHub 的链接地址:[GitHub](<a href="https://github.com/">https://github.com/</a>)</p></blockquote><p>效果:</p><blockquote><p>这是 GitHub 的链接地址:<a href="https://github.com/">GitHub</a></p></blockquote><h3 id="2-10-表格">2.10. 表格</h3><p>Markdown 制作表格使用 | 来分隔不同的单元格,使用 - 来分隔表头和其他行。</p><p>语法格式如下:</p><blockquote><p>| 表头 | 表头 |</p><p>| ---- | ---- |</p><p>| 单元格 | 单元格 |</p><p>| 单元格 | 单元格 |</p></blockquote><p>效果:</p><table><thead><tr><th>表头</th><th>表头</th></tr></thead><tbody><tr><td>单元格</td><td>单元格</td></tr><tr><td>单元格</td><td>单元格</td></tr></tbody></table><h6 id="对齐方式">对齐方式</h6><p>我们可以设置表格的对齐方式:</p><ol><li><code>-:</code> 居右对齐。</li><li><code>:-</code> 居左对齐。</li><li><code>:-:</code> 居中对齐。</li></ol><p>例如:</p><blockquote><p>| 左对齐左对齐 | 右对齐右对齐 | 居中对齐居中对齐 |</p><p>| :-----| ----: | :----: |</p><p>| 单元格 | 单元格 | 单元格 |</p><p>| 单元格 | 单元格 | 单元格 |</p></blockquote><p>效果:</p><table><thead><tr><th style="text-align:left">左对齐左对齐</th><th style="text-align:right">右对齐右对齐</th><th style="text-align:center">居中对齐居中对齐</th></tr></thead><tbody><tr><td style="text-align:left">单元格</td><td style="text-align:right">单元格</td><td style="text-align:center">单元格</td></tr><tr><td style="text-align:left">单元格</td><td style="text-align:right">单元格</td><td style="text-align:center">单元格</td></tr></tbody></table><h3 id="2-11-图片">2.11. 图片</h3><p>Markdown 图片语法格式有三部分组成:</p><ul><li>开头一个感叹号 !</li><li>接着一个方括号,里面放上图片的替代文字</li><li>接着一个普通括号,里面放上图片的网址,最后还可以用引号包住并加上选择性的 ‘title’ 属性的文字。<br>如:<blockquote><p>![alt 属性文本](图片地址)</p></blockquote></li></ul><h3 id="2-12-转义字符">2.12. 转义字符</h3><p>Markdown 使用了很多特殊符号来表示特定的意义,例如 <code>#</code>、<code>_</code>、<code>{}</code> 等,如果需要显示特定的符号则需要使用转义字符,Markdown 使用反斜杠 <code>\</code> 转义特殊字符,如:</p><blockquote><p>\*\* 正常显示星号 \*\*</p></blockquote><p>效果:</p><blockquote><p>** 正常显示星号 **</p></blockquote><h3 id="2-13-脚注">2.13. 脚注</h3><p>在需要添加注脚的文字后加上脚注名: [^注脚名] 。 然后在文本的任意位置(一般在最后)添加脚注,如:</p><blockquote><p>约翰·格鲁伯[^1]是 Markdown 的创始人。</p><p>注释在页尾,可以通过点击注脚到达。</p><p>[^1]: <a href="https://baike.baidu.com/link?url=k2LEB3d4MOnSZEImWYbU010aHuDheV01ljKzbzGPVju5NhoBaGD3z9WIdGnuGMElsNx2uiISHHGqR_EJLK9vKIa8mVjvBWXkmdmiqU2tESu">百度百科 - </a></p></blockquote><h3 id="2-14-LaTex-公式">2.14. LaTex 公式</h3><p>默认下的分隔符:</p><p><code>$$...$$</code> 或者 <code>\[...\]</code> 或者 ````math` 中的数学表达式将会在块内显示。</p><p>如:</p><blockquote><p>$$</p><p>\begin{Bmatrix}</p><p>a & b \</p><p>c & d</p><p>\end{Bmatrix}</p><p>$$</p></blockquote><p>效果:</p><blockquote><p>$$<br>\begin{Bmatrix}<br>a & b \<br>c & d<br>\end{Bmatrix}<br>$$</p></blockquote><h3 id="2-15-Markdown-高阶用法">2.15. Markdown 高阶用法</h3><p>对于纯 Markdown 编辑器来说,基础语法已经足够了,而高阶用法可能并不兼容。并且,有些高阶语法真的很鸡肋,学习意义不大,建议了解。比如 Markdown 支持 HTML元素,可以画流程图、时序图、甘特图等等。</p>]]></content>
<summary type="html">这篇文章介绍了Markdown语言的基础语法,它简单易学,使得标记文本变得容易。Markdown支持标题、列表、链接、图片、区块引用和代码区块等语法元素,用户可以利用这些功能编写结构化的文本。此外,文章可能还提及了Markdown的扩展语法和如何在不同平台和软件中使用Markdown。</summary>
</entry>
<entry>
<title>随身 wifi 综合小记</title>
<link href="https://blog.tutuxka.eu.org/posts/368ec568.html"/>
<id>https://blog.tutuxka.eu.org/posts/368ec568.html</id>
<published>2024-10-02T07:01:50.856Z</published>
<updated>2024-10-02T07:06:53.032Z</updated>
<content type="html"><![CDATA[<p>一、首先给随身wifi刷入Debian系统</p><p>1.我是参考酷安的这篇文章:</p><p><a href="https://www.coolapk.com/feed/52891879?shareKey=MTEyMDYxNDRjNWU2NjZiNWMwOWU">随身wifi刷入Debian系统(详细图文教程)</a>有很详细的教程。</p><p>2.给随身WiFi debain系统更换源</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"># 删除并重新创建 /etc/apt/sources.<span class="built_in">list</span> 文件</span><br><span class="line"></span><br><span class="line">sudo rm /etc/apt/sources.<span class="built_in">list</span></span><br><span class="line"></span><br><span class="line">sudo touch /etc/apt/sources.<span class="built_in">list</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 写入阿里云的 Debian 软件源到 /etc/apt/sources.<span class="built_in">list</span> 文件</span><br><span class="line"></span><br><span class="line">sudo bash -c <span class="string">'cat <<EOF > /etc/apt/sources.list</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb http://mirrors.aliyun.com/debian-security/ bullseye-security main</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">EOF'</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'1、默认软件源修改完成!nn'</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 修改 AdoptOpenJDK 软件源列表</span><br><span class="line"></span><br><span class="line">sudo sed -i <span class="string">'1c deb http://mirrors.tuna.tsinghua.edu.cn/Adoptium/deb buster main'</span> /etc/apt/sources.<span class="built_in">list</span>.d/AdoptOpenJDK.<span class="built_in">list</span></span><br><span class="line"></span><br><span class="line">gpg --keyserver hkp:<span class="comment">//keyserver.ubuntu.com:80 --recv-keys 843C48A565F8F04B</span></span><br><span class="line"></span><br><span class="line">sudo gpg --armor --export <span class="number">843</span>C48A565F8F04B | sudo apt-key add -</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'nn2、AdoptOpenJDK报错修复完成!nn'</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 屏蔽 Mobian 软件源</span><br><span class="line"></span><br><span class="line">sudo sed -i <span class="string">'1c #deb http://repo.mobian-project.org/ bullseye main non-free'</span> /etc/apt/sources.<span class="built_in">list</span>.d/mobian.<span class="built_in">list</span></span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'3、Mobian源报已屏蔽!'</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'nn####################################nn即将开始更新软件源list......n'</span></span><br><span class="line"></span><br><span class="line">sleep <span class="number">5</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 更新软件源列表</span><br><span class="line"></span><br><span class="line">sudo apt-get update</span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'nn4、更新软件源list更新完成!'</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'nn####################################nn即将开始升级系统程序至最新版......'</span></span><br><span class="line"></span><br><span class="line">sleep <span class="number">5</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 持保 openssh-server 包不被更新</span><br><span class="line"></span><br><span class="line">sudo apt-mark hold openssh-server</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 升级系统所有包</span><br><span class="line"></span><br><span class="line">sudo apt-get -y upgrade</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 解除 openssh-server 包的持保</span><br><span class="line"></span><br><span class="line">sudo apt-mark unhold openssh-server</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">echo -e <span class="string">'5、系统升级完成!'</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>二、给随身wifi刷入typecho</p><p>这里用全自动安装脚本,自动安装配置Nginx MySQL PHP,安装完毕大约占用500MB空间。</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">wget -O /root/install_typecho.sh https:<span class="comment">//www.weirain.com/install_typecho.sh && chmod +x /root/install_typecho.sh && /root/install_typecho.sh</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>备份命令 /root/backup_typecho.sh</p><p>还原命令 /root/restore_typecho.sh</p><p>三、搭建frp实现内网穿透</p><p>1.服务端配置 使用frp一键部署脚本,</p><p><a href="https://github.com/mvscode/frps-oneke">项目地址</a></p><p>Aliyun(国内推荐)</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">wget https:<span class="comment">//code.aliyun.com/MvsCode/frps-onekey/raw/master/install-frps.sh -O ./install-frps.sh</span></span><br><span class="line"></span><br><span class="line">chmod <span class="number">700</span> ./install-frps.sh</span><br><span class="line"></span><br><span class="line">./install-frps.sh install</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>Gitee</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">wget https:<span class="comment">//gitee.com/mvscode/frps-onekey/raw/master/install-frps.sh -O ./install-frps.sh</span></span><br><span class="line"></span><br><span class="line">chmod <span class="number">700</span> ./install-frps.sh</span><br><span class="line"></span><br><span class="line">./install-frps.sh install</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>Github</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">wget https:<span class="comment">//raw.githubusercontent.com/mvscode/frps-onekey/master/install-frps.sh -O ./install-frps.sh</span></span><br><span class="line"></span><br><span class="line">chmod <span class="number">700</span> ./install-frps.sh</span><br><span class="line"></span><br><span class="line">./install-frps.sh install</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>Uninstall(卸载)</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">./install-frps.sh uninstall</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>Update(更新)</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">./install-frps.sh update</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>服务端相关命令frps start #启动frps服务端</p><p>frps stop #停止frps服务端</p><p>frps restart #重启frps服务端</p><p>frps status #显示frps状态</p><p>frps config #配置frps服务端</p><p>frps version #显示frps版本</p><p>2.步骤说明:</p><p>2.github (default)输入下载frp服务端配置文件的服务器,默认GitHub</p><p>Please input frps bind_port1-65535:</p><p>输入frp提供服务的端口,用于服务器端和客户端通信,默认5443</p><p>Please input frps vhost_http_port1-65535:</p><p>输入frp进行http穿透的http服务端口,默认80</p><p>Please input frps vhost_https_port1-65535:</p><p>输入frp进行https穿透的https服务端口,默认443</p><p>Please input frps dashboard_port [1-65535]</p><p>(Default : 6443):</p><p>输入frp的控制台服务端口,用于查看frp工作状态,默认6443</p><p>Please input frps dashboard_user(Default :admin):</p><p>输入frp的控制台服务账号,默认admin</p><p>Please input frps dashboard_pwd(Default :):</p><p>输入frp的控制台服务密码,默认是随机生成的</p><p>Please input frps token(Default :):</p><p>输入frp服务器和客户端通信的密码,默认是随机生成的</p><p>Please input frps subdomain_host(Default :…):</p><p>输入frp服务器自定义域名,支持自定义二次域名,默认是服务器IP地址</p><p>Please input frps max_pool_count [1-200]</p><p>(Default : 50):</p><p>设置每个代理可以创建的连接池上限,默认50</p><p>Please select log_level</p><p>1: info (default)</p><p>2: warn</p><p>3: error</p><p>4: debug</p><p>设置日志等级,4个选项,默认是info</p><p>Please input frps log_max_days [1-30]</p><p>(Default : 3 day):</p><p>设置日志保留天数,范围是1到30天,默认保留3天</p><p>Please select log_file</p><p>1: enable (default)</p><p>2: disable</p><p>设置是否开启日志记录,默认开启,开启后日志等级及保留天数生效,否则等级和保留天数无效</p><p>Please select tcp_mux</p><p>1: enable (default)</p><p>2: disable</p><p>客户端和服务器端之间的连接支持多路复用,默认开启</p><p>Please select kcp support</p><p>1: enable (default)</p><p>2: disable</p><p>选择是否开启kcp 协议,默认开启,弱网环境下传输效率提升明显,但会有额外的流量消耗</p><p>启动成功后自定义域名:6443即可访问控制台,服务端就安装成功了。</p><p>客户端配置</p><p>首先,前往Github上下载frp客户端文件,<a href="https://github.com/fatedier/frp/releases">Github</a> ,我的随身WiFi是arm64的,我下载的版本是0.51.3。</p><p>3.1.配置frp</p><p>解压frp_*_linux_arm.tar.gz,修改frpc.ini</p><p>[common]server_addr = xx.xx.xx.xx</p><p>公网服务器ip</p><p>server_port = 5443</p><p>与服务器bind_port一致</p><p>token = MaOB49PlIgfQDuTy</p><p>与服务器token一致</p><p>[wifi]</p><p>type = http</p><p>连接协议 ssh http https tcp等</p><p>local_ip = 192.168.2.233</p><p>内网服务器ip 为本地web服务对应地址</p><p>local_port = 8080</p><p>本地web服务端口</p><p>remote_port = 6000</p><p>自定义访问内部端口</p><p>custom_domains =xx.xx</p><p>绑定域名</p><p>3.2.运行frp</p><p>根据自己的需求把frpc和frpc.ini上传到运行的目录,root权限输入</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">./frpc -c ./frpc.ini</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>3.3.远程访问</p><p>此时,就可以在外网访问网内资源了。</p><p>3.4.frpc后台运行并自启wifi</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">sudo nano /etc/systemd/system/frpc.service</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">把下面的内容写入frpc.service中</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">[Unit]</span><br><span class="line"></span><br><span class="line">Description=FRPC Client</span><br><span class="line"></span><br><span class="line">After=network.target</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line"></span><br><span class="line">User=user</span><br><span class="line"></span><br><span class="line">WorkingDirectory=/home/user/frp</span><br><span class="line"></span><br><span class="line">ExecStart=/home/user/frp/frpc -c /home/user/frp/frpc.ini</span><br><span class="line"></span><br><span class="line">Restart=always</span><br><span class="line"></span><br><span class="line">RestartSec=<span class="number">5</span>s</span><br><span class="line"></span><br><span class="line">Type=simple</span><br><span class="line"></span><br><span class="line"># StandardOutput=syslog # 这两行可以删除,因为它们已经被废弃</span><br><span class="line"></span><br><span class="line"># StandardError=syslog</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">[Install]</span><br><span class="line"></span><br><span class="line">WantedBy=multi-user.target</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">然后运行下面的命令</span><br><span class="line"></span><br><span class="line">sudo systemctl daemon-reload</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">sudo systemctl start frpc</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">sudo systemctl status frpc</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">sudo systemctl enable frpc</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>根据自己的需求改就好。</p><p>四、给随身wifi安装docker</p><p>1.从软件源一键安装docker</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">apt install -y docker.io docker-compose</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>自启动Docker</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">systemctl enable --now docker</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>2.Docker官方一键安装脚本</p><p>使用官方源安装(国内直接访问较慢)</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">curl -fsSL https:<span class="comment">//get.docker.com | bash</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>使用阿里源安装</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">curl -fsSL https:<span class="comment">//get.docker.com | bash -s docker --mirror Aliyun</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>使用中国区Azure源安装</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">curl -fsSL https:<span class="comment">//get.docker.com | bash -s docker --mirror AzureChinaCloud</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>自启动Docker</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">systemctl enable --now docker</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>一键安装最新版Docker Compose:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">COMPOSE_VERSION=`git ls-remote https:<span class="comment">//github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | sort --version-sort | tail -n 1`</span></span><br><span class="line"></span><br><span class="line">sh -c <span class="string">"curl -L https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"</span></span><br><span class="line"></span><br><span class="line">chmod +x /usr/local/bin/docker-compose</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>到这里就安装好docker了。</p><p>随身wifi目前已经稳定运行了十多天了,很不错。</p>]]></content>
<summary type="html">这篇文章介绍了如何给随身WiFi刷入Debian系统的过程。首先,作者参考了酷安网上一篇文章进行操作。</summary>
</entry>
<entry>
<title>2023~2024年度记录</title>
<link href="https://blog.tutuxka.eu.org/posts/a15ff491.html"/>
<id>https://blog.tutuxka.eu.org/posts/a15ff491.html</id>
<published>2024-09-07T08:08:16.052Z</published>
<updated>2024-11-02T12:25:31.230Z</updated>
<content type="html"><![CDATA[<div class="hbe hbe-container" id="hexo-blog-encrypt" data-wpm="抱歉, 这个密码看着不太对, 请再试试!" data-whm="OOPS, these decrypted content may changed, but you can still have a look."> <script id="hbeData" type="hbeData" data-hmacdigest="86e0d6bbc31a024b1d6550a2537fb073a722453abb9c2904c8d15471e08dae03">01af338e4b4a06f1d12a97e9e89082c6b303c86838141be580d8016b513911ff312aa56616652b7a14750e44d54bbedb5eeffe3cf3d3a8248ff7bced7eebecfc3fdab77a5121647067d47256c695ccc82767084f39a74efe0679f409484ae19512106a12e18172eb5f6a7a2463ed76c0ed54a59d9f8ea7b8ea1f265a6bbf8d53f09ac5b496ca56c35fa6268480ffe674f4f455456fb584ba258d03dd27082ab735f33582ad0a6c2942a77596151cb3df291c2eb91d8b647e41c0812106928c8d16eda576ff8e15b7ee8a4c72d474bbdd31ab45e6423ce0c18c21c3a4152087f51ee6aef2f5cc5f2faf3a693f8bb7006df54c1a4e1a4ae926b8ba145b9a4f52f7aa6dd6afa9c76199928b71919a74fa4e1b4e4c20633913bc918bc755af9f2bbab5aeb4ca4a7d59104fe0e8ef86d4482dd359b8901f7f0365b8e1dc02ea7bab1eab21ee8bf508354788c7b56401ba7a70e24687f4f12e2ebf308edc1c8ad8a5790d554b6852065387d88ec5193040c30a62f969449355364d9441b0e27694a1314d7ad49ee7a449ad766123acb9732e2e206522960895548f9ffaa0cb4f165864cdf21b404cff70dc4b35271240346b448a67e1c725717be37c4b9c842418344e3d51e1e769acfde5d7dba80aec15beeb85914c2d46d5412e89823812c6dbfea87b196b693f2de27271f82371cb206b16824b5118a4ed3cf9a2923b13e8d9ea85a9770e56ab8da99d1e85baa78dadb7b5910b29fca197872b4f60f674cf215ea706291bfbf18a68fea7f70ba77b8b0804e243106cadd9997c6a623e7e9eadc6a9ab48b531efd4f75cc22e03a0106c7b8ae730c1a7c5dc89b327d095c335dad252c64cfd30f3e079409992f189570671844b0e1524395415c65e14d53dbd3ba1e2b32e0dd3cc936c439e6d3c4e127ea525d683b77b1929bfffb38e6db533343c11ca432712c3cf361d41a0cf3f41403f05718fc369c86b6f0e6e921b9a6b5ec8fb94639df8fb60b309b1fad816b4102078f025047b8677bc32ee62fdd46b201e7a84c841c8112e5a5be533c777d35466672f6d53597e11a65f0c4e2f8b5d77acf824d898433c0d53e251d0c2c233ace0aaea66cca55c65d72126fb6e11cdbb49febb5d97cc9d663af020d1d863b262f7d646c8cc6dda34c884a0ed4347be11ba6be8237b995835cbc0728ccb5bd9a8beaa4a02146ce83a93ac9c4e10aa4366ad96b473a7be3c5d6cb3b901010513c12532c01d1ff0e67e373003056a515b517af8b83b7e653291a67afbec7213a5fa988445f6aefd0d615477693174263979a745d36a78a4d644492e90ca5bf1a21733e7946f0af937f2d6dd0610d9657108cd653f152a17bfe04401a9ceafe4b223ceb020767060d284f14952c0dbd6091ffdeed43d1aa2c2c3424208c4cd9c66b73543b188f75a7d5ce8be8621d50076dd331e0fd8f1366144c1016c78ce83e03cc81bb3a854041ea7141c68b2cb2f8e1686f44865f7b5770b3960987d0eae6ef71518e81e8de07213a88defa675d36ded200257c1e895a1b4faba48b75951da4aea20e51bd53927002104fc32e6633f7cecc5d2b3c54c96680468e59d24580032932195cd707379f625e0e7569dbae2463ca70a8c0e1cde9f4b27d6092b30830162ec00e3b946a508aba9e6f71f1f67927cccdd3e9600622a5d1d822b643e89e910767b4752ad2fa4c94da2c53efdb1d1e03b8c1a303ef83bb4ce978914fbd8298e4c4e7b4caa1ab66810982b0c207c2723b760b7da4b877d1ae53a8d2f8a65d7610a27babd8ce96c71052d99e0ba34f6ee69ac6d2171691a26c8e874f1f07a70b9aab9afe9a00d3d5a46f0238ed8ec850d903cc60411d026e9d387c22e17be1571c145b02a3e745c50c0d417ca5fc5dc8feeb27b4119add0289933d4873bd5f7722b7e644e1ef2c0002d6b87dde774cb5aa3bbf77a221e112515aaf6093d41fb89fc121b92f439cf14916941096300659f854aab8462594ad752cf7dbeb8808671ab0754d2788d7932a5341ce170b93fd60d2b4231d1b47aa4bdea6e90fe5bf06a8bbacb7bb01734e5306fcd9a5d3f6b58ff8456bc235e7ced6e7ec6162f4a3fb6327a48af155ecb772e6f06a4673491d94c212529d5c8f09605cb6e056a4f9a88c61afa248af5691c01c0fbc5468005bb726814fab79f9b9012cf7b409499aa44f710f59cd9efdd5439b6e8199a99340994c09e39c58c8cc6aa8e4d788829d9f8d8be3ebe3ed96ece1ab27c6e098237e83fe893063c5b21a9293e1dc8c4e80cb311807f8cbee12632c1abb15381b05b0f6b09a5ef75532159975489fbde7f3ed5799467f4384adabc1af940687a8ed39e0fab8e7a5f835e6927928881bc8903663b3de0d46b1c937e8f0e22cb2577662a9c40d4fc4a7044ea180b0cd85658cb5eb641b40922ca13adaedd839903a401ed73674dcacfd3dbf3886ed665c1e2c9de8f6d3b3e79ba7e4ff473248c7435f27f8e40e6447cee546a25e65a86d7ea999c895e62d80e75d7ea26ebf9e073b6559d2bba712ff161c2f2c3abdd83c33e09665ed9b6987a92d570519ae6b90be815f86c9e9c8f96c44db8dd6f89d320d4e3f75566281a5eed8a2363a9709316f1707da9f37be47862dcdfe4441abfce56edc2b42064f38fd80602b3c3878b540acfa307ce93890a87b0a318143756a87d78c79e71063ce82e35e79b637a2cbf0f9e436701cfb5ae830cd033187a2e0414a6b0a00254cb97c4ca680330e3e94fca74aff18d7de5e88dced13cf51fda599e3a986d09b18e40350da42e000c758ad1d3f178d3fa106cead3331acdccd88b1e70af2265e965096afb9d448b64705df20438b94db905addd4be536ef079e538dbb539d361a87fbbde6a7bfe61fcd35d038e55e298c65373cfbf07dd83c5eedbd3a76a2185e1888e828a878c66f7afbb32af8057decedce9c579735d4166347a20d552e69f0cc09c5bb0d3db8d28a26a5e36ec300620fd2e2fb1449451602b559595f127cb7f210e4120dc70cdf1e9d45c3ca9713ebbc6d2b56fcdf432e817fd07dd35fb9d7f543b79fad65d16bc24594641ca521e3136fe66bb5079130c17276ee05875fd269f95281ac71419a3ca3b6f3b7f4bb9d331c7730c3cf1c460326c21ed0ac3664188abcb33b50d85fd8a9ef97cb97987f08d3ed5f6ce82a31aef1e67eb535f50adadb118b719d3cbc8e9f58e7bc48976e0069051c290e2ab15af532878a17ce84e5555701316f576d1140e04b6d775001ae70931acbe0d07fc18c032339e85e95b291fe7240a19da54cf15376eed01c534d3e4fe12d4fb51c67b65fdf9d0c2120ce14ff051cb847871de87d41498c7abfad693acc8f7013e7bea25bd0d48e1456b94f9d686e9d0849d575915060f6cf28a0ec32d0805d1d7e3024d66897ce578063903b617fe8dbbbcb998cdf3398802a49f3bb25d6b639ac96be80a4a8a1bdb8653990cb085c59c0dc7ce98f439965cd6102a0ae4fc69430bcb371d74db5c8122e55198ee025c95320ff422ce18eaf8e502862cbd22c8be83edd801b4be2680276bd7be59424d9999e3bf4b6c432e4ff10065655dfcf7bec49f931b0f1185dff8a7292394fc3d230dff3d647c67cb27682d070c8b8c21131446c6b22b20c53a73ae09621f44096f70075a9f1a67b9d2382cf21eb520a5ea51bdcc43358d8e4a1ec431f4671b7c6a94efb16841df2cbac50c3181e3c7f1606d672d573d3b6c2a48efc888671da05e35a7b5bd46a1feae283e2d2236ab9bf97c73ba01b3f07c66fe3cef2f2f001fc4b625ec59536910d86d26dcf18164c75d3785314da2017e96a79a0d69eaa19cce833b1ceee0bac4f41b3ef4601840b05d8f10635633277a9918e3dacdf9415ea0bb07aa61153e750f43c31e2d805c71cb57e4723234716654bf110bb954833203f8472a33f81070ba2380f9a8d863cf4c6289acf99fccfbc8ef1a68561e7aca180beff346404d1</script> <div class="hbe hbe-content"> <div class="hbe hbe-input hbe-input-xray"> <input class="hbe hbe-input-field hbe-input-field-xray" type="password" id="hbePass"> <label class="hbe hbe-input-label hbe-input-label-xray" for="hbePass"> <span class="hbe hbe-input-label-content hbe-input-label-content-xray">这里记录我的一些事情哦,需要密码才能进入!</span> </label> <svg class="hbe hbe-graphic hbe-graphic-xray" width="300%" height="100%" viewBox="0 0 1200 60" preserveAspectRatio="none"> <path d="M0,56.5c0,0,298.666,0,399.333,0C448.336,56.5,513.994,46,597,46c77.327,0,135,10.5,200.999,10.5c95.996,0,402.001,0,402.001,0"></path> <path d="M0,2.5c0,0,298.666,0,399.333,0C448.336,2.5,513.994,13,597,13c77.327,0,135-10.5,200.999-10.5c95.996,0,402.001,0,402.001,0"></path> </svg> </div> </div></div><script data-pjax src="/lib/hbe.js"></script><link href="/css/hbe.style.css" rel="stylesheet" type="text/css">]]></content>
<summary type="html">这篇文章介绍了作者在2023至2024年度的感悟,表达了对2024年的期待和憧憬,感叹了时间的流逝和生活的变化。</summary>
<category term="生活点滴" scheme="https://blog.tutuxka.eu.org/categories/%E7%94%9F%E6%B4%BB%E7%82%B9%E6%BB%B4/"/>
<category term="生活" scheme="https://blog.tutuxka.eu.org/tags/%E7%94%9F%E6%B4%BB/"/>
</entry>
<entry>
<title>记 QQ 无头机器人搭建教程</title>
<link href="https://blog.tutuxka.eu.org/posts/427ff66d.html"/>
<id>https://blog.tutuxka.eu.org/posts/427ff66d.html</id>
<published>2024-07-26T16:11:48.363Z</published>
<updated>2024-07-26T16:31:33.734Z</updated>
<content type="html"><![CDATA[<p>First. 环境</p><p>电脑一枚, QQ 最新版,以及一个科学的上网环境,加一个灵活的双手</p><p>Second.电脑登入 QQ,并再手机上开启自动登入,然后退出 QQ(是退出程序,不是退出登入哈😊)</p><p>Than.下载最新版 QQ 无头框架 <a href="https://github.com/NapNeko/NapCatQQ-Desktop/releases%EF%BC%8C%E7%84%B6%E5%90%8E%E5%90%AF%E5%8A%A8%EF%BC%8C%E7%82%B9%E5%87%BB">https://github.com/NapNeko/NapCatQQ-Desktop/releases,然后启动,点击</a> Napcat,点击下载,然后等待下载完成,然后添加机器人,名称随便写,机器人 QQ 号就填你刚才电脑登入的那个 QQ 号,其他的不用管,点击连接配置,点击 websocket 服务,点击启用,主机填 127.0.0.1,端口填 6700,最后点击添加到机器人列表,启动,便可以了,后续可自行对接插件</p>]]></content>
<summary type="html">这篇文章介绍了使用电脑,QQ最新版和科学上网环境进行某种操作或活动的相关内容。</summary>
<category term="教程" scheme="https://blog.tutuxka.eu.org/tags/%E6%95%99%E7%A8%8B/"/>
</entry>
<entry>
<title>自建腾讯地理位置api</title>
<link href="https://blog.tutuxka.eu.org/posts/4ecf8221.html"/>
<id>https://blog.tutuxka.eu.org/posts/4ecf8221.html</id>
<published>2023-09-30T06:00:16.604Z</published>
<updated>2024-01-31T02:29:01.681Z</updated>
<content type="html"><![CDATA[<p>祝大家双节快乐,这里分享一下怎么自己搭建博客首页的地理位置欢迎api</p><p>首先你要有一个vercel的账号,没有的可以自行百度注册一个</p><p>然后点击部署</p><p><a href="https://vercel.com/import/project?template=https://github.com/kongxiangyiren/vercel-thinkjs"><img src="https://vercel.com/button" alt="部署"></a></p><p>部署成功和可以自己换一个域名,根据页面内的教程替换代码便可以了。</p>]]></content>
<summary type="html">这篇文章介绍了如何搭建博客首页的地理位置欢迎API,并祝大家双节快乐。文章内容涉及了博客首页地理位置欢迎API的搭建方法。</summary>
<category term="技术教程" scheme="https://blog.tutuxka.eu.org/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/"/>
</entry>
<entry>
<title>地球online更新</title>
<link href="https://blog.tutuxka.eu.org/posts/fae67b61.html"/>
<id>https://blog.tutuxka.eu.org/posts/fae67b61.html</id>
<published>2023-08-24T06:58:29.337Z</published>
<updated>2024-01-26T03:02:44.294Z</updated>
<content type="html"><![CDATA[<p>地球onile将在8.24日00:00分进行版本更新并将于12点开服</p><p>更新内容:新增核废水太平洋</p><p>主线任务:活到成年</p><p>更新团队:🇯🇵</p><p>更新计划:制造哥斯拉</p><p>更新内容尽情期待</p><p>停服补偿:奇异海鲜及墓碑蓝图一份</p><p>PS:可能由于网络(天气)延迟,导致开服时间推后</p><p>——地球onile运营团队</p><p>《地球online》更新预告</p><p>亲爱的玩家你好:</p><p>本次更新于8月24日早上7~10点,系统检测到《地球online》玩家对海洋的探索进度低于30%做出此不关服更新</p><p>新增:</p><p>绿色的海洋 本次海洋拥有全新元素与新的生物和新的文明遗址</p><p>地球OL要迎来新的赛季“辐射”</p><p>1.添加了新的地形“被污染的海”“被污染的土地”</p><p>2.给人物增添了新的健康条“辐射值”</p><p>3.盖格计数器被新增词条“必需品”“任务”</p><p>4.新增词条“辐射”“被污染”</p><p>5.更多的DNA分支</p><p>6.将更新大部分设施</p><p>7.削弱全体玩家</p><p>8.将“防护服”归为平民用品</p><p>以上是赛季“辐射”的更新内容</p><p>祝各位玩家游戏愉快😋</p>]]></content>
<summary type="html">这篇文章介绍了地球online游戏即将进行版本更新和开服的消息。更新和开服时间分别为8月24日的00:00和12:00。</summary>
<category term="日本" scheme="https://blog.tutuxka.eu.org/tags/%E6%97%A5%E6%9C%AC/"/>
<category term="核废水" scheme="https://blog.tutuxka.eu.org/tags/%E6%A0%B8%E5%BA%9F%E6%B0%B4/"/>
</entry>
<entry>
<title>hello-world</title>
<link href="https://blog.tutuxka.eu.org/posts/b1d4025b.html"/>
<id>https://blog.tutuxka.eu.org/posts/b1d4025b.html</id>
<published>2023-02-09T07:03:35.724Z</published>
<updated>2024-11-02T12:34:04.132Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start">Quick Start</h2><h3 id="Create-a-new-post">Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server">Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files">Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites">Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
<summary type="html"><p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for</summary>
</entry>
<entry>
<title>新年快乐</title>
<link href="https://blog.tutuxka.eu.org/posts/2b9cc7eb.html"/>
<id>https://blog.tutuxka.eu.org/posts/2b9cc7eb.html</id>
<published>2023-01-29T17:04:42.000Z</published>
<updated>2023-01-29T17:04:47.000Z</updated>
<content type="html"><![CDATA[<p>祝大家新年快乐吧,虽然年已经过完了,但还是要记录一下的</p>]]></content>
<summary type="html"><p>祝大家新年快乐吧,虽然年已经过完了,但还是要记录一下的</p>
</summary>
<category term="生活点滴" scheme="https://blog.tutuxka.eu.org/categories/%E7%94%9F%E6%B4%BB%E7%82%B9%E6%BB%B4/"/>
</entry>
</feed>