We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7ddac8 commit 934b169Copy full SHA for 934b169
cron/update_questions.py
@@ -24,15 +24,13 @@
24
print("Updating question metadata")
25
26
for question in questions["data"]:
27
- p = urlparse(question["url"])
28
- title_slug = p.path.rstrip('/').split('/')[-1]
29
- our_difficulty = question["difficulty"]
30
- variables = {"titleSlug": title_slug}
+ variables = {"titleSlug": question["url"]}
31
32
response = requests.post("https://leetcode.com/graphql",
33
json={"query": query, "variables": variables}
34
)
35
+ our_difficulty = question["difficulty"]
36
leetcode_difficulty = response.json()["data"]["question"]["difficulty"]
37
38
if leetcode_difficulty != our_difficulty:
0 commit comments