This file contains hidden or 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 threading | |
import urllib.request | |
import os | |
from queue import Queue | |
class Downloader(threading.Thread): | |
"""Threaded File Downloader""" | |
def __init__(self, queue): | |
"""Initialize the thread""" |
This file contains hidden or 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
from selenium import webdriver | |
from bs4 import BeautifulSoup | |
#import pandas as pd | |
import os | |
import sqlite3 | |
#default path for database | |
DEFAULT_PATH = os.path.join(os.path.dirname(__file__), 'database.sqlite3') | |
#db connection function |
This file contains hidden or 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
#Top 100 Celebrity data stored in SQLite3 DB and CSV file | |
# | |
from bs4 import BeautifulSoup as soup | |
from urllib.request import urlopen as uReq | |
#from db_utility import db_connect | |
from sqlite3 import Error | |
import sqlite3 | |
import os |
This file contains hidden or 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
#from selenium import webdriver | |
from bs4 import BeautifulSoup as soup | |
from urllib.request import urlopen as uReq | |
#import pandas as pd | |
my_url= 'https://www.flipkart.com/search?q=iphone' | |
uClient=uReq(my_url) | |
page_html=uClient.read() | |
uClient.close() |
This file contains hidden or 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
from time import sleep | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
def main(): | |
# Your Facebook account user and password |