This is my code which save the heading of www.nytimes.com in a .txt file.
Using requests and beautifulsoup
import requests from bs4 import BeautifulSoup u