Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests, bs4
- link = "https://newsapi.org/v2/top-headlines?sources=cnn&apiKey=2d674d5e895946d5a8a62dca2616ced8"
- web = requests.get(link)
- articles = web.json()['...']
- for titles in articles:
- title = titles['...']
- print(title)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement