full_gui_web_scrapping

a gui program used to scrap a particular website and adding the required data to a CSV file with actions of buttons

Web scrapping + SQLITE3 database connectivity + GUI in Tkinter

a gui program used to scrap a particular website and adding the required data to a CSV file with actions of buttons

Screenshots

Homepage

alt homepage

Scrapping Data

alt scrapping

Load Data into database

alt load-data

Show Data into Tree View

alt show-data

Database

alt database

Coding Snippets

Web Scrapping using BeautifulSoup

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"})

Database using SQLite

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)

GUI using Tkinter

root=tk.Tk()
root.title("web_scrapp_gui")

displayLabel=tk.Label(root,text="web scrapper",font=("Helvetica", 16))
displayLabel.pack()

Load and Fetch data to/from database performed using Thread

ThreadTask("load").start()

Class ThreadTask(Thread):
    def __init__(self,value):
        Thread.__init__(self)
        self.value=value