随笔分类 - Python
摘要:当没有安装pysocks库的时候,requests库是不支持socks5代理访问url的。 import requests if __name__ == '__main__': s = requests.session() s.proxies = {'https': 'socks5://127.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
阅读全文
摘要:需要先安装bencode.py库。 pip install bencode.py import bencode import hashlib from urllib.parse import quote def torrent_file_to_magnet(torrent_file): data =
阅读全文

浙公网安备 33010602011771号