-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
import requests
headers = {
"accept": 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
"accept-encoding": 'gzip, deflate, br',
"accept-language": 'zh-CN,zh;q=0.9',
"cache-control": 'max-age=0',
"cookie": "phusr=xxxx; phsid=xxx,
"sec-fetch-dest": 'document',
"sec-fetch-mode": 'navigate',
"sec-fetch-site": 'none',
"sec-fetch-user": '?1',
"upgrade-insecure-requests": '1',
"user-agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
}
if __name__ == '__main__':
import os
import copy
from pyquery import PyQuery
cs = []
rs = requests.get('https://{{yuming}}/diffusion/', headers=headers)
pq = PyQuery(rs.content.decode('U8'))
asd = pq(".phui-oi-link")
for i in asd:
cs.append('https://{{yuming}}' + PyQuery(i).attr('href')[:-1] + '.git')
for c in cs:
if 'diffusion' in c:
continue
f = os.path.split(copy.deepcopy(c))[1].replace('.git', '')
if os.path.exists(f'cccc/{f}'):
print(f'更新..{c}')
os.system(f'cd cccc/{f} && git pull')
print(f'更新完成..{c}')
else:
print(f'下载..{c}')
os.system('cd cccc && git clone {}'.format(c))
print(f'下载完成..{c}')
print('finished')lishulongVI
Metadata
Metadata
Assignees
Labels
No labels