From dd798020dc2998c0aa4990fa892d92196f94e12c Mon Sep 17 00:00:00 2001 From: Underworld511 Date: Fri, 8 Apr 2022 00:43:06 +0800 Subject: [PATCH] fixed: fixed the bug about phone number when login Fixed the bug that the second digit of the mobile phone number cannot be 9. closed #3 --- CHANGELOG | 3 +++ README.md | 2 +- ks.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c786e22..ba41001 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Friday, 8 April 2022: Version 0.7.2 + Fixed the bug that the second digit of the mobile phone number cannot be 9. + Friday, 15 July 2021: Version 0.7 Added "login" and "logout" commands for handling the token. Added "--quality" flag that allows users to download videos of various qualities. diff --git a/README.md b/README.md index 2368b21..6b57634 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ KouShare-dl 是一个使用 [Cobra](https://github.com/spf13/cobra) 开发的用于从 [“蔻享学术”](https://www.koushare.com/) 视频网站下载视频和课件的 CLI 工具。 -您可以在常见的桌面操作系统(Windows,macOS 和 Linux 的各个发行版)里使用该命令行工具。该工具已被发布至公有领域,因此您可以按照您的想法自由使用它,如对它进行修改、重新发布等操作。 +您可以在常见的操作系统(Windows,macOS 和 Linux 的各个发行版)里使用该命令行工具。该工具已被发布至公有领域,因此您可以按照您的想法自由使用它,如对它进行修改、重新发布等操作。 # 目录 diff --git a/ks.go b/ks.go index 3b20f1e..c7d2ebd 100644 --- a/ks.go +++ b/ks.go @@ -131,7 +131,7 @@ func main() { Long: `[phone number]参数为手机号码(格式15012345678),输入短信验证码以登陆“蔻享学术”平台并将登陆凭证保存至本地.登录后一周内免再次登录.`, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - re := regexp.MustCompile(`[1][34578][0-9]{9}`) + re := regexp.MustCompile(`[1][3-9][0-9]{9}`) if !re.MatchString(args[0]) { fmt.Println("手机号码格式不正确") return