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': b = BugsCrawler( 'https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11' ) b.scap() elif flag == 'k': k = KrxCrawler( "https://sports.news.naver.com/kbaseball/record/index.nhn?category=kbo" ) k.scarp() elif flag == 'ns': ns = StockModel('005930') ns.scarp() elif flag == 'nm': nm = NaverMoive( 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn') nm.scap() elif flag == 'nl': nl = NaverLogin('https://nid.naver.com/nidlogin.login') nl.auto_login() # https://sports.news.naver.com/kbaseball/record/index.nhn?category=kbo
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': a = AssemblyCrawler( 'http://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_R1N9J0N1X0Y9A1O8S3R5Z3J3K9O8N7' ) return a.scrap() elif flag == 'b': b = BugsCrawler( 'https://music.bugs.co.kr/chart/track/realtime/total?chartdate=20190810&charthour=11' ) return b.scrap() elif flag == 'c': c = KospiCrawler('https://finance.naver.com/sise/') return c.scrap() elif flag == 'k': k = KrxCrawler( 'http://kind.krx.co.kr/disclosureSimpleSearch.do?method=disclosureSimpleSearchMain' ) return k.scrap() elif flag == 'ns': ns = StockModel(str('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': 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(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': 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
def exec(self, flag, url): crawler = None if flag == 'a': crawler = AssemblyCrawler(url) elif flag == 'b': crawler = BugsCrawler(url) elif flag == 'n': crawler = NaverCrawler(url) elif flag == 'n2': crawler = StockCrawler(url) elif flag == 'n3': crawler = MovieCrawler(url) elif flag == 'k': crawler = KrxCrawler(url) elif flag == 'n4': crawler = NaverLogin(url) if flag == 'n4': crawler.auto_login() else: crawler.scrap()