Python cantik mendapatkan nilai tag opsi
# 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)
Tense Termite