Skip to content

Commit

Permalink
需要vip会提示
Browse files Browse the repository at this point in the history
  • Loading branch information
zanjie1999 authored Jun 13, 2021
1 parent f08be4d commit 194d1d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions make_lrc_music_m3u.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,9 @@ def downMusic(tracksId, fileName):
print('Download music: ' + tracksId)
try:
urllib.request.urlretrieve(url, fileName)
if os.path.getsize(fileName) < 10000:
if os.path.getsize(fileName) < 20000:
# 小于10k这音频肯定有问题 给它扬了
f = open(fileName)
print(f.read())
f.close()
print('Need VIP')
os.remove(fileName)
return False
except:
Expand Down Expand Up @@ -361,6 +359,8 @@ def addPlaylist(mp3Title, mp3Name):
# 这里将下载一个无封面的128kbps的版本 听个响
if downMusic(tid, m3udir + mp3dir + fullFileNameAndroid):
db[tid] = fileNameAndroid
else:
noFileTxt += fileNameAndroid + '\r\n'
else:
print('NO File: ' + fileNameAndroid)
noFileTxt += fileNameAndroid + '\r\n'
Expand All @@ -382,7 +382,7 @@ def addPlaylist(mp3Title, mp3Name):
writeToFile(m3udir + mp3dir_in_m3udir + 'db.json', json.dumps(db, ensure_ascii=False))

# 没有文件的让人类处理
if not down128Music:
if noFileTxt != '':
writeToFile(m3udir + mp3dir + "noFile.txt", noFileTxt)

# 写播放列表文件
Expand Down

0 comments on commit 194d1d1

Please sign in to comment.