Skip to content

Commit

Permalink
Merge pull request #61 from Aalivexy/master
Browse files Browse the repository at this point in the history
fix: resolve SyntaxWarning from invalid escape sequences
  • Loading branch information
mos9527 committed Jul 25, 2024
2 parents 6c3d3d3 + b09e62b commit 5019dad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions demos/歌单同步.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
以下 .pyncm 即为你保存的登陆凭据
---
使用例 : 同步个人创建的歌单到`NetEase/[专辑名]`
python .\demos\歌单同步.py --load .pyncm --quality hires --output NetEase/{album}
python ./demos/歌单同步.py --load .pyncm --quality hires --output NetEase/{album}
使用例 : 同步个人创建+收藏的歌单到`NetEase/[专辑名]`,并保存 M3U 播放列表
python .\demos\歌单同步.py --load .pyncm --quality hires --output NetEase/{album} --user-bookmarks --save-m3u NetEase/PLAYLIST.m3u
python ./demos/歌单同步.py --load .pyncm --quality hires --output NetEase/{album} --user-bookmarks --save-m3u NetEase/PLAYLIST.m3u
使用例 : 同步某一歌单到`NetEase/[专辑名]`
python .\demos\歌单同步.py --load .pyncm --quality hires --output NetEase/{album} https://music.163.com/playlist?id=988690134
python ./demos/歌单同步.py --load .pyncm --quality hires --output NetEase/{album} https://music.163.com/playlist?id=988690134
'''
from sys import argv
from os import walk,path,remove
Expand Down
4 changes: 2 additions & 2 deletions pyncm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ def parse_sharelink(url):
"分享mos9527创建的歌单「東方 PC」: http://music.163.com/playlist?id=72897851187" (desktop app)
https://music.163.com/#/user/home?id=315542615 (user homepage)
"""
rurl = re.findall("(?:http|https):\/\/.*", url)
rurl = re.findall(r"(?:http|https):\/\/.*", url)
if rurl:
url = rurl[0] # Use first URL found. Otherwise use value given as is.
numerics = re.findall("\d{4,}", url)
numerics = re.findall(r"\d{4,}", url)
assert numerics != None, "未在链接中找到任何 ID"
ids = numerics[:1] # Only pick the first match
table = {
Expand Down

0 comments on commit 5019dad

Please sign in to comment.