This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################### | |
| # You can find the article about this gist here: | |
| # https://primates.dev/find-all-urls-of-a-website-in-a-few-seconds-python/ | |
| #################### | |
| import requests | |
| from bs4 import BeautifulSoup as Soup | |
| import pandas as pd | |
| import hashlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import xml.etree.ElementTree as ET | |
| r = requests.get('https://www.washingtonpost.com/arcio/news-sitemap/') | |
| print(r.content) | |
| xmlDict = {} | |
| root = ET.fromstring(r.content) | |
| for child in root.iter('*'): | |
| print(child.tag) | |
| for sitemap in root: | |
| children = sitemap.getchildren() |
NewerOlder