Skip to content

Commit dc822cd

Browse files
FirePing32cclauss
andauthored
Update web_programming/get_top_hn_posts.py
Co-authored-by: Christian Clauss <[email protected]>
1 parent 704856a commit dc822cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

web_programming/get_top_hn_posts.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ def hackernews_top_stories(max_stories: int = 10) -> dict:
1111

1212
top_stories = "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
1313

14-
data = requests.get(top_stories)
15-
top_10 = data.json()[:10]
14+
top_10 = requests.get(top_stories).json()[:10]
1615

1716
table_data = [
1817
["Title", "URL"],

0 commit comments

Comments
 (0)