Skip to content

Commit

Permalink
Delete bs4 in api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmozhijin committed Mar 9, 2024
1 parent 364d791 commit 25d3839
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from enum import Enum

import requests
from bs4 import BeautifulSoup

from decryptor.eapi import eapi_params_encrypt, eapi_response_decrypt, get_cache_key

Expand Down Expand Up @@ -651,10 +650,9 @@ def kg_search(info: str | dict, search_type: SearchType, page: int = 1) -> str |
case SearchType.SONGLIST:
results = []
for songlist in response_json['data']['info']:
name_soup = BeautifulSoup(songlist['specialname'], 'html.parser')
results.append({
'id': songlist['specialid'],
'name': name_soup.get_text(),
'name': songlist['specialname'],
'pic': songlist['imgurl'], # 歌单封面
'count': songlist['songcount'], # 歌曲数量
'time': songlist['publishtime'],
Expand Down

0 comments on commit 25d3839

Please sign in to comment.