Answers for "html deleting a item in a list and deleting the list"

0

List Delete a Element

a = [3,4,5]
del a[2]
print(a)
# [3, 4]
Posted by: Guest on December-10-2021
0

python remove html from a list item

import requests
from bs4 import BeautifulSoup

URL = "https://www.ebay.com/sch/i.html?_from=R40&_nkw=oneplus%206t&_sacat=0&rt=nc&_udlo=150&_udhi=450"
headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'}
page = requests.get(URL, headers=headers)
soup = BeautifulSoup(page.content, 'html.parser')

for price in soup.findAll("span", {"class": "s-item__price"}):
    print(price.get_text(strip=True))
Posted by: Guest on October-02-2021

Code answers related to "html deleting a item in a list and deleting the list"

Browse Popular Code Answers by Language