109951166113541633.jpg

chenxiaoxing

GF  2024-03-28 00:15

分享自己写的一些爬虫源码给有兴趣的人参考

此帖售价 0 SP币,已有 12 人购买
若发现会员采用欺骗的方法获取财富,请立刻举报,我们会对会员处以2-N倍的罚金,严重者封掉ID!

没有注释,可以让gpt写
和下面两个通用爬虫相比好处是可以直连来节省机场流量
https://github.com/mikf/gallery-dl
https://github.com/KurtBestor/Hitomi-Downloader
各位有什么想爬网站可以发出来,我感兴趣的话会尝试写一个

109951166113541633.jpg

chenxiaoxing

B1F  2024-04-08 19:42

回 30楼(algorith) 的帖子

doh查询需要pip install dnspython[doh]

109951166113541633.jpg

chenxiaoxing

B2F  2024-04-09 11:29

回 32楼(algorith) 的帖子

确定用的是dnspython库吗,不是dns

109951166113541633.jpg

chenxiaoxing

B3F  2024-04-10 12:18

回 38楼(algorith) 的帖子

# 手动指定nameservers试试

import dns.resolver

res = dns.resolver.Resolver()
res.nameservers = ["223.5.5.5", "119.29.29.29"]
answer = res.resolve("example.org", "A")
print(answer[0].to_text())

109951166113541633.jpg

chenxiaoxing

B4F  2024-04-10 15:10

回 42楼(algorith) 的帖子

实例化时 dns.resolver.Resolver(configure=False) 试试