Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@takakabe
Last active September 18, 2019 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takakabe/72e4ea1e81e12deb591934aeafcb8d22 to your computer and use it in GitHub Desktop.
Save takakabe/72e4ea1e81e12deb591934aeafcb8d22 to your computer and use it in GitHub Desktop.
BeautifulSoup
import requests
from bs4 import BeautifulSoup
from datetime import datetime
current_year = datetime.now().year
current_month = datetime.now().month
url = 'https://aws.amazon.com/jp/about-aws/whats-new/'+"{0:02d}".format(current_year)+'/'+"{0:02d}".format(current_month)+'/'
request = requests.get(url)
soup = BeautifulSoup(request.text, 'lxml')
for tag in soup.find_all('h3'):
print(tag.text.strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment