📅  最后修改于: 2022-03-11 14:57:48.485000             🧑  作者: Mango
# Import Module
from bs4 import BeautifulSoup
import requests
# Get HTML Content
r = requests.get("Enter Web URL:- ")
# Parse HTML Content
soup = BeautifulSoup(r.content, 'html.parser')
# Find select tag
select_tag = soup.find("select")
# find all option tag inside select tag
options = select_tag.find_all("option")
# Iterate through all option tags and get inside text
for option in options:
print(option.text)