def exec(self, flag): if flag == 'a': ab = AssemblyCrawler('http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_R1N9J0N1X0Y9A1O8S3R5Z3J3K9O8N7') ab.scrap() elif flag == 'b': bm = BugsCrawler('https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11') bm.scrap() elif flag == 'p': nK = NaverKospiCrawler('https://finance.naver.com/sise/') nK.scrap() elif flag == 'k': kr = KrxCrawler('http://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain') kr.scrap() elif flag == 's': st = StockCrawler('005930') st.scrap() elif flag == 'm': nm = NaverMovieCrawler('https://movie.naver.com/movie/sdb/rank/rmovie.nhn') nm.scrap() elif flag == 'l': nl = NaverLogin('https://nid.naver.com/nidlogin.login') nl.auto_login()
def exec(flag, url): if flag == 'a': a = AssemblyCrawler( 'http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_R1N9J0N1X0Y9A1O8S3R5Z3J3K9O8N7' ) a.scrap() elif flag == 'b': b = BugsCrawler( 'https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11' ) b.scrap() elif flag == 'k': k = KrxCrawler( 'http://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain' ) k.scrap() elif flag == 'ns': ns = StockModel('005930') ns = scrap() elif flag == 'nm': nm = NaverMovie( 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn') nm = scrap() elif flag == 'nl': nl = NaverLogin('https://naver.com')
def exec(self, flag): if flag == 'a': url = 'http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_R1N9J0N1X0Y9A1O8S3R5Z3J3K9O8N7' a = AssemblyCrawler(url) a.scrap() elif flag == 'b': url = 'https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11' b = BugsCrawler(url) b.scrap() elif flag == 'c': url = 'https://finance.naver.com/sise/' c = nc(url) c.scrap() elif flag == 'd': url = "http://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain" d = KrxCrawler(url) d.scrap() elif flag == 'e': url = '' e = sm('005930') e.scrap() elif flag == 'f': url = 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn' f = nm(url) f.scrap() elif flag == 'g': url = "https://nid.naver.com/nidlogin.login" g = NaverLogin(url) g.auto_login()
def exec(self, flag): if flag == 'a': a = AssemblyCrawler( 'http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_X1Z9M0U8Q0T9N1L8C0J4E1B9K9M3Q3' ) a.scrap() elif flag == 'b': b = BugsCrawler( 'https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11' ) b.scrap() elif flag == 'k': k = KrxCrawler( 'http://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain' ) k.scrap() elif flag == 'ns': ns = StockModel('005930') ns.scrap() elif flag == 'nm': nm = NaverMovie( 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn') nm.scrap() elif flag == 'nl': nl = NaverLogin( 'https://nid.naver.com/nidlogin.login?mode=form&url=https%3A%2F%2Fwww.naver.com' ) nl.auto_login()
def exec(self, flag): if flag == 'a': a = AssemblyCrawler( 'http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_R1N9J0N1X0Y9A1O8S3R5Z3J3K9O8N7' ) a.scrap() elif flag == 'b': bm = BugsCrawler( "https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11" ) bm.scrap() elif flag == 'c': c = NaverKospi("https://finance.naver.com/sise/") c.scrap() elif flag == 'd': d = KrxCrawler( "http://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain" ) d.scrap() elif flag == 'ns': ns = StockMode('005930') ns.scrap() elif flag == 'nm': nm = NaverMovie( 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn') nm.scrap() elif flag == 'nl': nl = NaverLogin('https://nid.naver.com/nidlogin.login') nl.auto_login()
def exec(self, flag): if flag == 'a': url = 'http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_R1N9J0N1X0Y9A1O8S3R5Z3J3K9O8N7' a = AssemblyCrawler(url) a.scrap() elif flag == 'b': url = 'https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11' b = BugsCrawler(url) b.scrap() elif flag == 'n': url = 'https://finance.naver.com/sise/' n = Kospi_naverCrawler(url) n.scrap() elif flag == 'k': url = 'https://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain' k = KrxCrawler(url) k.scrap() elif flag == 'ns': ns = Naver_stockCrawler('005930') ns.scrap() elif flag == 'nm': url = 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn' nm = Naver_movieCrawler(url) nm.scrap() elif flag == 'log': url = 'https://nid.naver.com/nidlogin.login?mode=form&url=https%3A%2F%2Fwww.naver.com' login = NaverLogin(url) login.auto_login() elif flag == '0': print("Exit") # return result
from webcrawl.bugsmusic import BugsCrawler if __name__ == '__main__': print('a. 국회 크롤링:\n') print('b. 벅스 크롤링:\n') print('0. 종료') bm = BugsCrawler('https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=10') bm.scrap()