Skip to content

Commit 36573df

Browse files
author
openset
committed
Update: CmdPost
1 parent 58dcfce commit 36573df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: internal/post/post.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"os"
77
"path"
88
"regexp"
9-
"strconv"
109
"strings"
1110
"time"
1211

@@ -31,12 +30,12 @@ func runPost(cmd *base.Command, args []string) {
3130
formatSimilarQuestion := " 1. [%s](/%s)%s\n"
3231
problems := leetcode.ProblemsAll()
3332
for _, problem := range problems.StatStatusPairs {
33+
questionId := problem.Stat.FrontendQuestionId
3434
titleSlug := problem.Stat.QuestionTitleSlug
3535
question := leetcode.QuestionData(titleSlug, false).Data.Question
3636
if question.TranslatedContent != "" {
37-
fmt.Println(question.QuestionFrontendId, "\t"+question.TranslatedTitle, "saving...")
37+
fmt.Println(questionId, "\t"+question.TranslatedTitle, "saving...")
3838
var buf bytes.Buffer
39-
questionId, _ := strconv.Atoi(question.QuestionFrontendId)
4039
t := time.Date(2016, 1, 1, 21, 30, 0, 0, time.Local)
4140
t = t.AddDate(0, 0, questionId)
4241
var tags []string
@@ -131,6 +130,7 @@ var inPosts = map[int]bool{
131130
2: true,
132131
3: true,
133132
4: true,
133+
6: true,
134134
7: true,
135135
8: true,
136136
9: true,

0 commit comments

Comments
 (0)