From the AWS cloud product page, put the AWS service name in csv

When asked what to use it for, there is no choice but to shut up


import requests
import re
import csv
from bs4 import BeautifulSoup

r = requests.get('https://aws.amazon.com/jp/products/')
data = BeautifulSoup(r.text,'html.parser')
tags = data.find_all("div",class_="lb-content-item")

regex = re.compile('<a href.*?>(?P<name>.*?)<span>(?P<content>.*?)</span>')

with open('a.csv','w',newline='',encoding='utf8') as f:
    writer = csv.writer(f)

    for t in map(lambda tag:str(tag),tags):
        m = regex.search(t)
        writer.writerow([m['name'],m['content']])

a.csv


 Amazon Athena,Data query in S3 using SQL
 Amazon CloudSearch,Managed search service
...

Recommended Posts

From the AWS cloud product page, put the AWS service name in csv
Extract the product name and price from the product list in the Yodobashi.com purchase statement email.
Get the file name saved in AWS S3 (1000 or more)
Format the Git log and get the committed file name in csv format
Put the module in the Pepper app
Gender is determined from the name.
Get the host name in Python
Implemented in Dataflow to copy the hierarchy from Google Drive to Google Cloud Storage