I web scraped a website and inputted the data into an sql3 database. For some reason, there's this black star in front of each name that's not an asterisk. It's one character that goes in front of the name, and I don't want to go in each row of data and erase it by hand because that's tedious, plus when I update the data on the table, the stars are just gonna come back. Does anyone know how to remove the star before it goes into the table? the data I extracted is a list with dictionaries as the elements. Thank you in advance!
import requests
from bs4 import BeautifulSoup
import byebyebirdie
import json
##from tkinter import *
##bobert=Tk()
##bobert.geometry("600x600")
import sqlite3
connection = sqlite3.connect('covidproject.db')
cursor = connection.cursor()
##cursor.execute("DROP TABLE IF EXISTS covid ")
##cursor.execute("CREATE TABLE IF NOT EXISTS covid (name STRING, confirmed REAL, changes_today REAL,deceased REAL,active REAL, recovered REAL)")
url = 'https://ncov2019.live/'
headers = {'User-Agent':'Mozilla/5.0'}
response = requests.get(url, headers = headers)
response.status_code
soup = BeautifulSoup(response.content,'html.parser')
stat_table = soup.find_all("table", attrs={"class": "display responsive"})
headers = [header.get_text(strip=True) for header in soup.find_all("th")]
rows = [dict(zip(headers, [td.get_text(strip=True) for td in row.find_all("td")]))
for row in soup.find_all("tr")[1:-1]]
print("e")
i=9
##while 8<i<223:
## print("h")
## roa=rows[i]['Name']
## rob=rows[i]['Confirmed']
## roc=rows[i]['Changes Today']
## rod=rows[i]['Deceased']
## roe=rows[i]['Active']
## rof=rows[i]['Recovered']
## cursor.execute("INSERT INTO covid VALUES('"+roa+"','"+rob+"','"+roc+"','"+rod+"','"+roe+"','"+rof+"')")
## connection.commit()
## i=i+1
print (json.dumps(rows[9], indent=2))
print (rows[222]['Name'])
The dictionaries in the list look like this
{
"Name": "\u2605Hong Kong",
"Confirmed": "1,714",
"Changes Today": "0",
"Percentage Day Change": "0%",
"Critical": "8",
"Deceased": "11",
"Percentage Death Change": "0%",
"Tests": "442,256",
"Active": "439",
"Recovered": "1,264"
}
and in sqlite3 the name would look like this:★Albania