随笔分类 -  Python

摘要:当没有安装pysocks库的时候,requests库是不支持socks5代理访问url的。 import requests if __name__ == '__main__': s = requests.session() s.proxies = {'https': 'socks5://127.0. 阅读全文
posted @ 2020-10-21 02:55 fatalord 阅读(3585) 评论(0) 推荐(0)
摘要:在网上看到的别人写的python2的代码,修改成了python3。 把纯真IP数据库文件qqwry.dat放到czip.py同一目录下。 1 #! /usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # filename: czip.py 4 5 6 im 阅读全文
posted @ 2019-04-27 17:14 fatalord 阅读(1951) 评论(0) 推荐(0)
摘要:需要先安装bencode.py库。 pip install bencode.py import bencode import hashlib from urllib.parse import quote def torrent_file_to_magnet(torrent_file): data = 阅读全文
posted @ 2019-04-21 16:23 fatalord 阅读(2861) 评论(0) 推荐(0)