本文最后更新于 1499 天前,其中的信息可能已经有所发展或是发生改变。
本工具依赖Python Requests库,在Python 3版本中运行
我的博客首页有非常多的图片,而这些图片所对应的URL并不是全部都可以访问的,有部分文件已经无法使用了,在首页会以空白的形式显示,非常的丑。
在网上找了很多现成的脚本,都不能非常好的完成我的需求,仔细想了想,这个需求也不难,于是自己手写了一下。
然后就死循环了,怎么救都救不了,最后在好兄弟 Akibaso的帮助下搞定
import requests
import os
urlin = open("url-in.txt")
urlin = str(urlin.read())
urllist = urlin.split()
outurl = []
times = 0
num = len(urllist) -1
def check(url):
try:
request = requests.get(url)
status = request.status_code
except:
print('error')
status=114514
if status != 200:
return url
else:
return 200
for url in urllist:
i = check(url)
if i == 200:
outurl.append(url)
try:
os.remove("url-out.txt")
outfile = open("url-out.txt",mode="w")
except:
outfile = open("url-out.txt",mode="w")
for i in outurl:
outfile.write(str(i)+"\n")
outfile.close()
print('ok')
本工具可以批量区分大量链接中正常的链接和不能正常使用的链接
将要检测的URL写入进 url-in.txt 然后运行即可
URL写入示范
一行一个
https://lo-li.icu
https://lo-li.icu/404
https://cloudflare.com
输出文件 url-out.txt 中会输出返回200的URL,一行一个
GitHub: FutureApple/url-check


I’ve tried a few sites lately, but the interface here is just so smooth. Really enjoying the gameplay so far. Definitely check out brwinpg if you want a reliable experience.
I’ve tried a few different platforms lately, but the access speed here is top notch. Logging in is a breeze every time. Highly recommend bcgamelogin for anyone who hates waiting for pages to load.
The game variety here is insane. I had a great run last night and the payouts were super quick. cipung138slot is definitely my new go-to spot.
The app is incredibly responsive and doesn’t lag at all. It’s perfect for playing on the go. Just downloaded 369jlapp and it is awesome.
The variety of games available here is impressive. I spent all weekend trying different slots and the wins were surprisingly frequent. Love jili777slotgame.
I was having some trouble figuring out the login process but this guide made it so simple. Now I can get straight to my bets without any hassle comoingresarabetplay.
Finally found a slot site that actually feels lucky. The graphics are crisp and the gameplay is super addictive. Check out mm007slot if you love spinning.
开始
学习√
重点:最后在好兄弟 Akibaso 的帮助下搞定
解决x
重写✓
重写x
重构✓