Skip to content

Commit

Permalink
Update 2024-10-27 22:57
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwang1978 committed Oct 27, 2024
1 parent c673468 commit b9e8976
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
36 changes: 36 additions & 0 deletions assets/今日推荐.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
周杰伦-告白气球,http://em.21dtv.com/songs/60146129.mkv
周杰伦-告白气球,http://em.21dtv.com/songs/60128900.mkv
周杰伦-Now You See Me,http://em.21dtv.com/songs/60123755.mkv
周杰伦-土耳其冰淇淋,http://em.21dtv.com/songs/60127852.mkv
周杰伦-米兰的小铁匠,http://em.21dtv.com/songs/60029951.mkv
周杰伦-最后的战役,http://em.21dtv.com/songs/60060222.mkv
周杰伦-爷爷泡的茶,http://em.21dtv.com/songs/60052419.mkv
周杰伦-手写的从前,http://em.21dtv.com/songs/60108396.mkv
周杰伦-火车叼位去,http://em.21dtv.com/songs/60022412.mkv
周杰伦-反方向的钟,http://em.21dtv.com/songs/60016491.mkv
周杰伦-爸我回来了,http://em.21dtv.com/songs/60009639.mkv
周杰伦-爱在西元前,http://em.21dtv.com/songs/60009204.mkv
周杰伦-止战之殇,http://em.21dtv.com/songs/60058758.mkv
周杰伦-伊斯坦堡,http://em.21dtv.com/songs/60053964.mkv
周杰伦-一路向北,http://em.21dtv.com/songs/60053294.mkv
周杰伦-烟花易冷,http://em.21dtv.com/songs/60051963.mkv
周杰伦-以父之名,http://em.21dtv.com/songs/60054081.mkv
周杰伦-威廉古堡,http://em.21dtv.com/songs/60043747.mkv
周杰伦-三年二班,http://em.21dtv.com/songs/60037270.mkv
周杰伦-牛仔很忙,http://em.21dtv.com/songs/60032737.mkv
周杰伦-开不了口,http://em.21dtv.com/songs/60024976.mkv
周杰伦-可爱女人,http://em.21dtv.com/songs/60025267.mkv
周杰伦-黑色幽默,http://em.21dtv.com/songs/60020561.mkv
周杰伦-青花瓷,http://em.21dtv.com/songs/60034743.mkv
光良-童话,http://em.21dtv.com/songs/60042729.mkv
光良-童话,http://vodcdn.video.taobao.com/oss/ali-video/e2c54a5b89aaa794cfc186c41d2ef348/video.m3u8
阿黛尔(adele)-Someone Like You,https://15799848.s21v.faiusr.com/58/ABUIABA6GAAgkayy4gUo8tSy9QE.mp4
阿黛尔(adele)-set fire to the rain,https://15799848.s21v.faiusr.com/58/ABUIABA6GAAgm6qy4gUowM6P2Ac.mp4
阿黛尔(adele)-Rolling in the deep,https://15799848.s21v.faiusr.com/58/ABUIABA6GAAgl6my4gUohcv6swU.mp4
阿黛尔(adele)-Don't You Remember,https://15799848.s21v.faiusr.com/58/ABUIABA6GAAg-aey4gUotf_ntgQ.mp4
杨宗纬-明日晴れるかな(演唱会),http://em.21dtv.com/songs/60030139.mkv
周杰伦-暗号,http://em.21dtv.com/songs/60009367.mkv
逃跑计划乐队-夜空中最亮的星,http://em.21dtv.com/songs/60081693.mkv
梁静茹-勇气,http://vodcdn.video.taobao.com/oss/ali-video/f501ffc81da040099b17fb1db30b92fe/1462937648/video.m3u8.m3u8
周传雄-黄昏,http://em.21dtv.com/songs/60137418.mkv
张韶涵-阿刁,http://em.21dtv.com/songs/60151605.mkv
17 changes: 15 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,19 @@ def custom_sort(s):
if response_time < 2000: #2s以内的高响应源
process_channel_line(",".join(whitelist_parts[1:]))

# 随机取得URL
def get_random_url(file_path):
urls = []
with open(file_path, 'r', encoding='utf-8') as file:
for line in file:
# 查找逗号后面的部分,即URL
url = line.strip().split(',')[-1]
urls.append(url)
# 随机返回一个URL
return random.choice(urls) if urls else None

daily_mtv="今日推歌,"+get_random_url('assets/今日推荐.txt')

# 获取当前的 UTC 时间
utc_time = datetime.now(timezone.utc)
# 北京时间
Expand All @@ -541,7 +554,7 @@ def custom_sort(s):
version=formatted_time+","+about_video1
about="关于本源,"+about_video2
# 瘦身版
all_lines_simple = ["更新时间,#genre#"] +[version] +[about] + ['\n'] +\
all_lines_simple = ["更新时间,#genre#"] +[version] +[about] +[daily_mtv]+ ['\n'] +\
["💓专享源🅰️,#genre#"] + read_txt_to_array('主频道/♪专享源①.txt') + ['\n'] + \
["💓专享源🅱️,#genre#"] + read_txt_to_array('主频道/♪专享源②.txt') + ['\n'] + \
["💓专享央视,#genre#"] + read_txt_to_array('主频道/♪优质央视.txt') + ['\n'] + \
Expand All @@ -561,7 +574,7 @@ def custom_sort(s):

# 合并所有对象中的行文本(去重,排序后拼接)
# ["奥运频道,#genre#"] + sort_data(Olympics_2024_Paris_dictionary,set(correct_name_data(corrections_name,Olympics_2024_Paris_lines))) + ['\n'] + \
all_lines = ["更新时间,#genre#"] +[version] +[about] + ['\n'] +\
all_lines = ["更新时间,#genre#"] +[version] +[about] +[daily_mtv] + ['\n'] +\
["💓专享源🅰️,#genre#"] + read_txt_to_array('主频道/♪专享源①.txt') + ['\n'] + \
["💓专享源🅱️,#genre#"] + read_txt_to_array('主频道/♪专享源②.txt') + ['\n'] + \
["💓专享央视,#genre#"] + read_txt_to_array('主频道/♪优质央视.txt') + ['\n'] + \
Expand Down

0 comments on commit b9e8976

Please sign in to comment.