Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
fix html tags not be escaped
Browse files Browse the repository at this point in the history
  • Loading branch information
comwrg committed Nov 21, 2018
1 parent c285e45 commit bb6c364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion for_lossless_music/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .song import Song
from .quality import *

__version__ = '0.1.2'
__version__ = '0.1.3'


def search(keyword, source: Source, page=1, num=20):
Expand Down
7 changes: 4 additions & 3 deletions for_lossless_music/qqmusic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import html
import requests
import urllib.parse
from .song import Song
Expand Down Expand Up @@ -59,9 +60,9 @@ def search(keyword, page=1, num=20):
tags.append(size[k])
###
ret.append(Song(id=num*(page-1) + i+1,
name=e['songname'],
singers=[s['name'] for s in e['singer']],
album=e['albumname'],
name=html.unescape(e['songname']),
singers=[html.unescape(s['name']) for s in e['singer']],
album=html.unescape(e['albumname']),
interval=sec2humantime(e['interval']),
tags=tags,
source=Source.QQ,
Expand Down

0 comments on commit bb6c364

Please sign in to comment.