Skip to content

Commit 52a9480

Browse files
Update update_readme.py to use questionFrontendId
1 parent a93968b commit 52a9480

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

update_readme.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
date
1414
link
1515
question {
16-
questionId
16+
questionFrontendId
1717
title
1818
titleSlug
1919
difficulty
@@ -33,7 +33,7 @@
3333
# Check if the expected data is present in the API response
3434
if 'data' in data and 'activeDailyCodingChallengeQuestion' in data['data']:
3535
problem = data['data']['activeDailyCodingChallengeQuestion']['question']
36-
problem_id = problem['questionId']
36+
problem_id = problem['questionFrontendId']
3737
title = problem['title']
3838
title_slug = problem['titleSlug']
3939
link = f"https://leetcode.com/problems/{title_slug}"
@@ -82,7 +82,7 @@
8282
table_content[-1] = table_content[-1].rstrip()
8383

8484
# Rebuild the README with the new entry added to the table
85-
updated_readme = before_table + table_content + [new_entry + '\n'] + after_table
85+
updated_readme = before_table + table_content + [new_entry + '\n\n'] + after_table
8686

8787
# Overwrite the README file with the updated content
8888
with open(readme_file, 'w') as file:

0 commit comments

Comments
 (0)