a gui program used to scrap a particular website and adding the required data to a CSV file with actions of buttons
a gui program used to scrap a particular website and adding the required data to a CSV file with actions of buttons
website_address="http://books.toscrape.com"
result=requests.get(website_address,verify=False)
soup=BeautifulSoup(result.text,"html.parser")
books=soup.findAll("article",{"class":"product_pod"})
table_query="CREATE TABLE IF NOT EXISTS "+TABLE_NAME+" \
("+TABLE_ID+" INTEGER PRIMARY KEY AUTOINCREMENT, "+BOOK_NAME+" TEXT, "+BOOK_PRICE+" TEXT); "
database.execute(table_query)
root=tk.Tk()
root.title("web_scrapp_gui")
displayLabel=tk.Label(root,text="web scrapper",font=("Helvetica", 16))
displayLabel.pack()
ThreadTask("load").start()
Class ThreadTask(Thread):
def __init__(self,value):
Thread.__init__(self)
self.value=value