Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to view topic tags along with question data #3

Closed
akki251 opened this issue Mar 2, 2022 · 2 comments
Closed

Feature to view topic tags along with question data #3

akki251 opened this issue Mar 2, 2022 · 2 comments

Comments

@akki251
Copy link

akki251 commented Mar 2, 2022

The json data is pretty good, but I was thinking could you also implement a field TOPICS of array, which contains topic tags for each question.

@akki251 akki251 changed the title Feature Feature to view topic tags along with question data Mar 2, 2022
@Bishalsarang
Copy link
Owner

Bishalsarang commented Mar 2, 2022

Currently, I'm busy with other stuffs. So I won't be able to implement it soon.
But you open the PR for this which is straightforward. There seems to be a topicTags key for each question.

{
      "acRate": 32.134976525374064,
      "difficulty": "MEDIUM",
      "freqBar": null,
      "frontendQuestionId": "50",
      "isFavor": false,
      "paidOnly": false,
      "status": "NOT_STARTED",
      "title": "Pow(x, n)",
      "titleSlug": "powx-n",
      "topicTags": [
          {
              "name": "Math",
              "id": "VG9waWNUYWdOb2RlOjg=",
              "slug": "math"
          },
          {
              "name": "Recursion",
              "id": "VG9waWNUYWdOb2RlOjMx",
              "slug": "recursion"
          }
      ],
      "hasSolution": true,
      "hasVideoSolution": false
  }

What you may have to is simply update this line to support tags.

problem_html = problem_title_html + str(soup.find("div", {"class": "content__u3I1 question-content__JfgR"})) + '<br><br><hr><br>'

It would be great to have tags as chip similar to what leetcode shows.

Feel free to ask questions if you have any confusion.

@akki251
Copy link
Author

akki251 commented Mar 2, 2022

Alright got it, Thanks👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants