Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NingmengLemon committed Mar 19, 2023
1 parent c9b8879 commit 6585c8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions CMLD.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def get_info(mid):
'title':bs.find('em',class_='f-ff2').get_text(),
'artists':[i.get_text() for i in bs.find_all('p',class_='des s-fc4')[0].find_all('a',class_='s-fc7')],
#'subtitle':bs.find('div',class_='subtit f-fs1 f-ff2').get_text(),
'cover:':bs.find('img',class_='j-img').attrs['data-src']
'cover':bs.find('img',class_='j-img').attrs['data-src']
}
try:
res['album'] = bs.find_all('p',class_='des s-fc4')[1].find('a',class_='s-fc7').get_text(),
res['album'] = bs.find_all('p',class_='des s-fc4')[1].find('a',class_='s-fc7').get_text()
res['album_id'] = int(bs.find_all('p',class_='des s-fc4')[1].find('a',class_='s-fc7').attrs['href'].split('?id=')[-1])
except IndexError:
res['album'] = None
Expand Down Expand Up @@ -362,8 +362,8 @@ def main():
elif choice.lower() == 'cls':
os.system('cls')
elif choice.lower() == 'config':
option = input('Config Menu'\
' (1)Encoding'\
option = input('Config Menu\n'\
' (1)Encoding\n'\
'Choice:').strip().lower()
if option == '1':
print('Current Encoding:',encoding)
Expand Down
2 changes: 2 additions & 0 deletions DevelopmentLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@ v.2.1.2-fix
v.2.1.3.20220709
移除完全匹配
v.2.1.3-fix
修复Bug
v.2.1.3-fix2
修复Bug
9 changes: 3 additions & 6 deletions requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
user_name = os.getlogin()

fake_headers_get = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', # noqa
'Accept-Charset': 'UTF-8,*;q=0.5',
'Accept-Encoding': 'gzip,deflate,sdch',
'Accept-Language': 'en-US,en;q=0.8',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.74 Safari/537.36 Edg/79.0.309.43', # noqa
'Referer':'https://www.bilibili.com/'
'Host':'music.163.com',
'Referer':'https://music.163.com/',
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
}

fake_headers_post = {
Expand Down

0 comments on commit 6585c8b

Please sign in to comment.