mirror of
https://github.com/mahdibland/V2RayAggregator.git
synced 2026-06-03 21:01:49 +08:00
❄️ Add Mixed format for Airport
This commit is contained in:
parent
2ff7736d5f
commit
7ed286f5a5
3
.github/workflows/Airport_Collector.yml
vendored
3
.github/workflows/Airport_Collector.yml
vendored
@ -68,8 +68,11 @@ jobs:
|
||||
git config --local user.name "GitHub Actions"
|
||||
git pull origin master
|
||||
git add EternityAir
|
||||
git add EternityAir.txt
|
||||
git add LogInfoAir.txt
|
||||
git add ./sub
|
||||
# git add ./sub/airport_sub_merge.txt
|
||||
# git add ./sub/airport_merge_base64.txt
|
||||
git commit -m "♻️ $(date '+%Y-%m-%d %H:%M:%S') Tested"
|
||||
- name: Push Change
|
||||
uses: ad-m/github-push-action@master
|
||||
|
||||
@ -7,6 +7,8 @@ out_json = './out.json'
|
||||
|
||||
Eternity_Air = "./EternityAir"
|
||||
airport_all_base64 = "./sub/airport_merge_base64.txt"
|
||||
sub_all = "./sub/airport_sub_merge.txt"
|
||||
Eternity_Air_file = "./EternityAir.txt"
|
||||
|
||||
|
||||
def read_json(file): # 将 out.json 内容读取为列表
|
||||
@ -49,6 +51,10 @@ def output(list, num):
|
||||
content_base64_part = base64.b64encode(
|
||||
'\n'.join(output_list[0:num]).encode('utf-8')).decode('ascii')
|
||||
|
||||
with open(airport_all_urls, 'w', encoding='utf-8') as f:
|
||||
f.writelines(output_list)
|
||||
print('Write All Urls Success!')
|
||||
f.close()
|
||||
with open(airport_all_base64, 'w+', encoding='utf-8') as f:
|
||||
f.write(content_base64)
|
||||
print('Write All Base64 Success!')
|
||||
@ -58,6 +64,15 @@ def output(list, num):
|
||||
print('Write Part Base64 Success!')
|
||||
f.close()
|
||||
|
||||
with open(sub_all, 'w') as f:
|
||||
f.write(content)
|
||||
print('Write All Success!')
|
||||
f.close()
|
||||
with open(Eternity_Air_file, 'w') as f:
|
||||
f.write('\n'.join(output_list[0:num]))
|
||||
print('Write Part Base Success!')
|
||||
f.close()
|
||||
|
||||
return content
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user