如何在iphone苹果6自带音乐播放器器里显示歌词

iOS自带音乐播放器imusic在线听没有歌词显示吗?
1. 谢邀2. 那叫Apple Music4. 没有歌词8. 以后很可能也不会有
已有帐号?
社交帐号登录
无法登录?
社交帐号登录后使用快捷导航没有帐号?
只需一步,快速开始
查看: 3757|回复: 2
最后登录阅读权限10注册时间积分190精华0帖子威望0 PP豆356 活跃度168
, 积分 190, 距离下一级还需 110 积分
TA的每日心情慵懒 14:22签到天数: 40 天连续签到: 1 天[LV.5]常住居民I帖子威望0 PP豆356 活跃度168
自带的播放器,如何才能做到歌词滚动,未
最后登录阅读权限20注册时间积分942精华0帖子威望14 PP豆4385 活跃度1259
, 积分 942, 距离下一级还需 658 积分
TA的每日心情慵懒8&小时前签到天数: 920 天连续签到: 4 天[LV.10]以坛为家III帖子威望14 PP豆4385 活跃度1259
同问诶{:7_318:}
最后登录阅读权限90注册时间积分33245精华11帖子威望11447 PP豆2750 活跃度18008
, 积分 33245, 距离下一级还需 26755 积分
TA的每日心情花心 11:39签到天数: 6 天连续签到: 1 天[LV.2]偶尔看看I帖子威望11447 PP豆2750 活跃度18008
暂时没有这样功能。
论坛创始人
论坛雷锋好模范
论坛回帖之王
产品客服专属勋章
发表15篇以上技术性文章会员
Powered by
Copyright&
Aihe Internet Technology Co.,Ltd. All Rights Reserved.广州爱禾网络技术有限公司 版权所有&&当前访客身份:游客 [
当前位置:
发布于 日 22时,
本程序开源的eyeD3库,从百度下载MP3歌词并同步到MP3中,供iphone等设备同步播放歌词,程序有误处,请多多指教。
使用说明:必须下载eyeD3才可使用
命令行运行程序 python lyricsdownload.py [MP3目录] [MP3文件名] ...
代码片段(1)
1.&[代码][Python]代码&&&&
#coding=UTF-8
Created on
@author: jackliu
import sys
import eyeD3
import urllib
class FileErrorException(Exception):
class RedApple:
def __init__(self):
baiduurl = ''
mp3url = "/m?f=ms&rf=idx&tn=baidump3lyric&ct=&lf=&rn=10&lm=-1&word=%s"
resultlyrics_r = '&div class="item-lyric"&.*?&/div&.*?&/div&.*?&/div&.*?&/div&'
lyrics_info = '&span class="title_c"&(.*?)&/span&.*?&span class="title_c"&.*?&a.*?&(.*?)&/a&.*?&div class="text-lyric-abstract.*?"&(.*?)&/div&'
lyrics_info_r = re.compile(lyrics_info,re.I)
next = '&a class=".*?next.*?".*?href="(.*?)"&'
next_r = re.compile(next,re.I)
filetypelist = ['mp3','mP3','Mp3','MP3']
class LyricsParser:
get lyrics from internet
__mp3Name = "" #音乐名称
__artist = ""
__lyrics = ""
def __init__(self,mp3Name,artist):
self.__mp3Name = mp3Name
self.__artist = artist
self.__lyrics = ""
def parse(self):
next_url = mp3url % urllib.quote(self.__mp3Name.encode('gbk','ignore'))
while next_url is not None:
#print next_url
mp3 = urllib.urlopen(next_url)
next_url = None
content = mp3.read();
content = content.decode('gbk','ignore');
content = re.sub('\n+',' ',content)
#获取歌词列表
result_lyrics= re.findall(resultlyrics_r,content)
match = next_r.search(content)
next_url = baiduurl+match.group(1)
next_url = None
for lyric_info in result_lyrics:
lyric_info = re.sub("&/?em&","",lyric_info)
match = lyrics_info_r.search(lyric_info)
# print lyric_info
if self.__checkLyric(match):
#print 'no lyrics'
def __checkLyric(self,match):
#print match.group(1),match.group(2)
if match.group(1).strip() == self.__mp3Name: #如果歌名匹配
lyrics = None
if match.group(3): #存在歌词
lyrics = re.sub("&br.*?&",'\n',match.group(3))
if match.group(2).strip() == self.__artist: #如果作者匹配
if lyrics != None:
self.__lyrics = lyrics
return True
else: #不匹配作者
if self.__lyrics == '': #如果当前歌词为空
self.__lyrics = lyrics
return False
def getLyric(self):
return self.__lyrics
def main():
if len(sys.argv) == 1:
print("error: the command like redapple folder|file [folder|file]...")
Pelease try again")
totalMp3File = 0 #总的文件数
successDownload = 0 #成功下载歌词的文件数
for path in sys.argv[1:]:
if os.path.isdir(path) or os.path.isfile(path):
(total,success) = download(path)
totalMp3File += total
successDownload += success
else: #不是文件目录也不是文件
print("error: %s is not a folder or file" % path)
print "Total: {0},success:{1}".format(totalMp3File,successDownload)
def download(path):
filelist = []
success = 0
maxlen = 0
if os.path.isdir(path):
for file in os.listdir(path):
fullpathname = os.path.join(path,file)
if fullpathname[-3:] in filetypelist:
if maxlen & len(fullpathname):
maxlen = len(fullpathname)
filelist.append(fullpathname)
fullpathname = path
if fullpathname[-3:] in filetypelist:
filelist.append(fullpathname)
maxlen += 6
for file in filelist:
print u"正在处理:",file,(maxlen - len(file))*'.',
if downloadLyricsByID3V3(file) or downloadLyricsByFilename(file):
success += 1
print u"下载成功"
print u"下载失败"
return len(filelist),success
def downloadLyricsByID3V3(file):
tag = eyeD3.Tag()
tag.link(file)
tag.encoding = '\x01'
if tag.getLyrics() and len(tag.getLyrics()[0].lyrics):
#已经存在歌词
#print tag.getLyrics()[0].lyrics
#不存在歌词,需要下载
artist = tag.getArtist()
title = re.sub("\(.*?\)",'',tag.getTitle())
lyricsParser = LyricsParser(title,artist)
lyricsParser.parse()
lyrics = unicode(lyricsParser.getLyric())
if len(lyrics) & 0 : #下载成功
tag.addLyrics(lyrics)
tag.update()
def downloadLyricsByFilename(file):
tag = eyeD3.Tag()
tag.link(file)
tag.encoding = '\x01'
if tag.getLyrics() and len(tag.getLyrics()[0].lyrics):
#已经存在歌词
#print tag.getLyrics()[0].lyrics
#不存在歌词,需要下载
filename = file[len(os.path.dirname(file))+1:]
artist,title =filename.rsplit('-',1)
artist = artist.strip()
title = title.strip()[:-4]
title = re.sub("\(.*?\)",'',title)
#print artist,title
lyricsParser = LyricsParser(title.decode('gbk'),artist.decode('gbk'))
lyricsParser.parse()
lyrics = unicode(lyricsParser.getLyric())
if len(lyrics) & 0 : #下载成功
tag.addLyrics(lyrics)
tag.update()
if __name__ == '__main__':
开源中国-程序员在线工具:
不错,顶。。
2楼:曾小亮 发表于
顶,那么长的代码啊。
3楼:落舞者 发表于
不错想当初我也为我的MP3写过一个自动下载歌词的小软件,不过是c#的
开源从代码分享开始
jackliu8722的其它代码}

我要回帖

更多关于 ipad自带音乐播放器 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信