Created
February 8, 2018 09:38
-
-
Save arunkarnann/945db569dc1c91ccfbb2d00d6daad5ec to your computer and use it in GitHub Desktop.
jd scrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from lxml import html | |
from tkinter import * | |
import tkinter as ttk | |
import re | |
import datetime | |
import os | |
from firebase import firebase | |
import hashlib | |
#import App as App | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
import time | |
#Region Tk | |
root = Tk() | |
root['height'] = 400 | |
root['width'] = 600 | |
global firebase | |
firebase = firebase.FirebaseApplication('#######URL####',None) | |
f1 = Frame(root) | |
f1["height"] = root["height"] | |
f1["width"] = root["width"] | |
root.title("JD Scrapper - Gear Up Studio ") | |
Label(f1,text = "Input Url : Example : https://www.justdial.com/Ahmedabad/Gyms ").grid(row=0,column = 0,) | |
def getBool(event): | |
print(boolvar.get()) | |
#Check Button | |
global boolvar | |
boolvar = BooleanVar() | |
boolvar.set(False) | |
boolvar.trace('w', lambda *_: print("The value was changed")) | |
cb = Checkbutton(f1, text = "Tele Phone number", variable = boolvar) | |
cb.bind("<Button-1>", getBool) | |
cb.grid(row=1, column=1) | |
global key_filled | |
key_filled = Entry(f1,width=50) | |
key_filled.grid(row=2,column=0) | |
key_filled.focus_set() | |
global activate_button | |
activate_button = Button(f1 , text="Active Now") | |
activate_button.bind("<Button-1>",activate_key) | |
activate_button.grid(row=2, column=1) | |
result = Label(f1, width=50) | |
result.grid(row=1,column=2) | |
global submit_button | |
submit_button = Button(f1 , text="Scrap Now") | |
submit_button.bind("<Button-1>",button_clicked) | |
submit_button.grid(row=1, column=0) | |
submit_button.config(state=NORMAL) | |
key_validation() | |
f1.pack() | |
root.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment