代码拉取完成,页面将自动刷新
#!/usr/bin/python
import re
import requests
common_url = 'https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/'
# url = 'http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/'
old_url = 'http://old-releases.ubuntu.com/ubuntu/pool/main/g/glibc/'
def get_list(url, arch):
content = str(requests.get(url).content)
return re.findall('libc6_(2\.[0-9][0-9]-[0-9]ubuntu[0-9\.]*_{}).deb'.format(arch), content)
common_list = get_list(common_url, 'amd64')
common_list += get_list(common_url, 'i386')
with open('list', 'w') as f:
for l in sorted(set(common_list)):
f.write(l + '\n')
print('[+] Common list has been save to "list"')
old_list = get_list(old_url, 'amd64')
old_list += get_list(old_url, 'i386')
with open('old_list', 'w') as f:
for l in sorted(set(old_list)):
f.write(l + '\n')
print('[+] Old-release list has been save to "old_list"')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。