Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3751f0b

Browse files
提交《网易云音乐歌单导出-速食版》对应代码
1 parent f25948a commit 3751f0b

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

‎xuanyuanyulong/2020-06-29-neteasy-cloudmusic-songlist-export/__init__.py

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from bs4 import BeautifulSoup
2+
3+
4+
# 文件 test.html 需由读者自行创建
5+
with open("test.html", "r", encoding="utf-8") as f:
6+
content = f.read()
7+
8+
response = BeautifulSoup(content,'lxml')
9+
10+
results = response.find_all("b")
11+
12+
with open("SongList.txt", "w+", encoding="utf-8") as f:
13+
f.writelines([result["title"] + "\n" for result in results])

‎xuanyuanyulong/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Python技术 公众号文章代码库
44

55
- [2020年02月29日-python-spiro](https://github.com/JustDoPython/python-examples/tree/master/xuanyuanyulong/2020-02-29-python-spiro)
66
- [2020年03月27日-PDF-watermark](https://github.com/JustDoPython/python-examples/tree/master/xuanyuanyulong/2020-03-27-PDF-watermark)
7+
- [2020年06月29日-neteasy-cloudmusic-songlist-export](https://github.com/JustDoPython/python-examples/tree/master/xuanyuanyulong/2020-06-29-neteasy-cloudmusic-songlist-export)
78

89

910
关注公众号:python 技术,回复"python"一起学习交流

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /