Skip to content

Commit 4ded73b

Browse files
committed
fix issue6
1 parent c1e0ed8 commit 4ded73b

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](logo.png)
22

3-
[![CircleCI](https://circleci.com/gh/haozibi/leetcode-badge/tree/master.svg?style=svg)](https://circleci.com/gh/haozibi/leetcode-badge/tree/master) [![](https://img.shields.io/badge/Github-leetcode--badge-blueviolet)](https://github.com/haozibi/leetcode-badge) [![Go Report Card](https://goreportcard.com/badge/github.com/haozibi/leetcode-badge)](https://goreportcard.com/report/github.com/haozibi/leetcode-badge) [![](https://leetcode-badge.haozibi.dev/v1cn/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved-rate/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/haozibi.svg)](https://leetcode-cn.com/haozibi)
3+
[![CircleCI](https://circleci.com/gh/haozibi/leetcode-badge/tree/master.svg?style=svg)](https://circleci.com/gh/haozibi/leetcode-badge/tree/master) [![](https://img.shields.io/badge/Github-leetcode--badge-blueviolet)](https://github.com/haozibi/leetcode-badge) [![Go Report Card](https://goreportcard.com/badge/github.com/haozibi/leetcode-badge)](https://goreportcard.com/report/github.com/haozibi/leetcode-badge) [![](https://leetcode-badge.haozibi.dev/v1cn/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved-rate/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/haozibi.svg)](https://leetcode.cn/haozibi)
44

55
![](https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/haozibi.svg?type=past-year)
66
![](https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/haozibi.svg?type=past-year&color=yellow)

README2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](logo.png)
22

3-
[![CircleCI](https://circleci.com/gh/haozibi/leetcode-badge/tree/master.svg?style=svg)](https://circleci.com/gh/haozibi/leetcode-badge/tree/master) [![](https://img.shields.io/badge/Github-leetcode--badge-blueviolet)](https://github.com/haozibi/leetcode-badge) [![Go Report Card](https://goreportcard.com/badge/github.com/haozibi/leetcode-badge)](https://goreportcard.com/report/github.com/haozibi/leetcode-badge) [![](https://leetcode-badge.haozibi.dev/v1cn/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved-rate/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted/haozibi.svg)](https://leetcode-cn.com/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/haozibi.svg)](https://leetcode-cn.com/haozibi)
3+
[![CircleCI](https://circleci.com/gh/haozibi/leetcode-badge/tree/master.svg?style=svg)](https://circleci.com/gh/haozibi/leetcode-badge/tree/master) [![](https://img.shields.io/badge/Github-leetcode--badge-blueviolet)](https://github.com/haozibi/leetcode-badge) [![Go Report Card](https://goreportcard.com/badge/github.com/haozibi/leetcode-badge)](https://goreportcard.com/report/github.com/haozibi/leetcode-badge) [![](https://leetcode-badge.haozibi.dev/v1cn/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved-rate/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/haozibi.svg)](https://leetcode.cn/haozibi)
44

55
# leetcode 徽标
66

internal/leetcode/follow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func GetFollow(name string) (*FollowInfo, error) {
2121
}
2222

2323
var (
24-
uri = "https://leetcode-cn.com/graphql/noty"
24+
uri = "https://leetcode.cn/graphql/noty"
2525
method = http.MethodPost
2626
client = http.DefaultClient
2727
p = DataFollow{}

internal/leetcodecn/models.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import (
1010
func init() {
1111
models.Register(models.RequestTypeUserProfile, models.RequestConfig{
1212
Desc: "user_profile",
13-
URI: "https://leetcode-cn.com/graphql",
13+
URI: "https://leetcode.cn/graphql",
1414
Method: http.MethodPost,
1515
Query: "{\"operationName\":\"userPublicProfile\",\"variables\":{\"userSlug\":\"%s\"},\"query\":\"query userPublicProfile($userSlug: String!) {\\nuserProfilePublicProfile(userSlug: $userSlug) {\\nusername\\nhaveFollowed\\nsiteRanking\\nprofile {\\nuserSlug\\nrealName\\nuserAvatar\\nlocation\\ncontestCount\\nasciiCode\\n__typename\\n}\\n submissionProgress {\\ntotalSubmissions\\nwaSubmissions\\nacSubmissions\\nreSubmissions\\notherSubmissions\\nacTotal\\nquestionTotal\\n__typename\\n}\\n__typename\\n}\\n}\\n\"}",
1616
Response: reflect.TypeOf(LeetCodeUserProfile{}),
1717
})
1818
models.Register(models.RequestTypeUserQuestionProgress, models.RequestConfig{
1919
Desc: "user_request_process",
20-
URI: "https://leetcode-cn.com/graphql",
20+
URI: "https://leetcode.cn/graphql",
2121
Method: http.MethodPost,
2222
Query: `{"query": "\n query userQuestionProgress($userSlug: String!) {\n userProfileUserQuestionProgress(userSlug: $userSlug) {\n numAcceptedQuestions {\n difficulty\n count\n }\n numFailedQuestions {\n difficulty\n count\n }\n numUntouchedQuestions {\n difficulty\n count\n }\n }\n}\n ","variables": {"userSlug": "%s"}}`,
2323
Response: reflect.TypeOf(LeetCodeUserQuestionProgress{}),

internal/leetcodecn/send.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ func SendRaw(client *http.Client, uri string, method string, query string) ([]by
2222
return nil, errors.Wrapf(err, "uri: %s, method: %s, query: %s", uri, method, query)
2323
}
2424

25-
req.Header.Add("origin", "https://leetcode-cn.com")
25+
req.Header.Add("origin", "https://leetcode.cn")
2626
req.Header.Add("user-agent", getUserAgent())
2727
req.Header.Add("content-type", "application/json")
28-
req.Header.Add("referer", "https://leetcode-cn.com")
28+
req.Header.Add("referer", "https://leetcode.cn")
2929

3030
resp, err := client.Do(req)
3131
if err != nil {

internal/leetcodecn/user_submission_calendar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func GetSubCal(name string) (map[string]int, error) {
1414
return nil, errors.Errorf("miss user name")
1515
}
1616

17-
uri := fmt.Sprintf("https://leetcode-cn.com/api/user_submission_calendar/%s/", name)
17+
uri := fmt.Sprintf("https://leetcode.cn/api/user_submission_calendar/%s/", name)
1818

1919
body, err := SendRaw(http.DefaultClient, uri, http.MethodGet, "")
2020
if err != nil {

0 commit comments

Comments
 (0)