Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import requests, bs4
  2.  
  3. link = "https://newsapi.org/v2/top-headlines?sources=cnn&apiKey=2d674d5e895946d5a8a62dca2616ced8"
  4. web = requests.get(link)
  5. articles = web.json()['...']
  6. for titles in articles:
  7. title = titles['...']
  8. print(title)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement