Skip to content

Commit

Permalink
fixed: fixed the bug about phone number when login
Browse files Browse the repository at this point in the history
Fixed the bug that the second digit of the mobile phone number cannot be 9.
closed  #3
  • Loading branch information
yliu7949 committed Apr 7, 2022
1 parent 5ef302e commit dd79802
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
KouShare-dl 是一个使用 [Cobra](https://github.com/spf13/cobra)
开发的用于从 [“蔻享学术”](https://www.koushare.com/) 视频网站下载视频和课件的 CLI 工具。

您可以在常见的桌面操作系统(Windows,macOS 和 Linux 的各个发行版)里使用该命令行工具。该工具已被发布至公有领域,因此您可以按照您的想法自由使用它,如对它进行修改、重新发布等操作。
您可以在常见的操作系统(Windows,macOS 和 Linux 的各个发行版)里使用该命令行工具。该工具已被发布至公有领域,因此您可以按照您的想法自由使用它,如对它进行修改、重新发布等操作。

# 目录

Expand Down
2 changes: 1 addition & 1 deletion ks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd79802

Please sign in to comment.