Skip to content

Commit f02a365

Browse files
authored
Update douyin.py
1 parent 28cba77 commit f02a365

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

douyin/douyin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_video_urls(self, user_id):
5353
except (OSError, IOError) as err:
5454
print('请先安装 node.js: https://nodejs.org/')
5555
sys.exit()
56-
sign = process.communicate()[0].decode().strip('\n')
56+
sign = process.communicate()[0].decode().strip('\n').strip('\r')
5757
print('解析视频链接中')
5858
while has_more != 0:
5959
user_url = 'https://www.amemv.com/aweme/v1/aweme/post/?user_id=%s&max_cursor=%s&count=21&aid=1128&_signature=%s&dytk=%s' % (user_id, max_cursor, sign, dytk)
@@ -65,7 +65,7 @@ def get_video_urls(self, user_id):
6565
share_desc = each['share_info']['share_desc']
6666
if os.name == 'nt':
6767
for c in r'\/:*?"<>|':
68-
nickname = nickname.replace(c, '').strip()
68+
nickname = nickname.replace(c, '').strip().strip('\.')
6969
share_desc = share_desc.replace(c, '').strip()
7070
share_id = each['aweme_id']
7171
if share_desc in ['抖音-原创音乐短视频社区', 'TikTok']:

0 commit comments

Comments
 (0)