def run(opts): try: p = Parallel() apis = [] api1 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api1.execute('findItemsAdvanced', {'keywords': 'python'}) apis.append(api1) api4 = html(parallel=p) api4.execute('http://www.ebay.com/sch/i.html?_nkw=Shirt&_rss=1') apis.append(api4) api2 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api2.execute('findItemsAdvanced', {'keywords': 'perl'}) apis.append(api2) api3 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api3.execute('findItemsAdvanced', {'keywords': 'php'}) apis.append(api3) p.wait() if p.error(): print p.error() for api in apis: dump(api) except ConnectionError as e: print e
def run(opts): p = parallel() apis = [] api1 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api1.execute('findItemsAdvanced', {'keywords': 'python'}) apis.append(api1) api4 = html(parallel=p) api4.execute('http://www.ebay.com/sch/i.html?_nkw=Shirt&_rss=1') apis.append(api4) api2 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api2.execute('findItemsAdvanced', {'keywords': 'perl'}) apis.append(api2) api3 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api3.execute('findItemsAdvanced', {'keywords': 'php'}) apis.append(api3) p.wait() if p.error(): raise Exception(p.error()) for api in apis: print("Call Success: %s in length" % len(api.response_content())) print("Response code: %s" % api.response_code()) print("Response DOM: %s" % api.response_dom()) dictstr = "%s" % api.response_dict() print("Response dictionary: %s...\n" % dictstr[:50])
def run404(opts): api = html(debug=opts.debug) api.execute('http://feeds2.feedburner.com/feedburnerstatus') #if api.error(): # print Exception(api.error()) dump(api) api.execute('http://feeds2.feedburner.com/feedburnerstatusd') if api.error(): raise Exception(api.error()) dump(api)
def run(opts): p = parallel() apis = [] api1 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api1.execute('findItemsAdvanced', {'keywords': 'python'}) apis.append(api1) api4 = html(parallel=p) api4.execute('http://www.ebay.com/sch/i.html?_nkw=Shirt&_rss=1') apis.append(api4) api2 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api2.execute('findItemsAdvanced', {'keywords': 'perl'}) apis.append(api2) api3 = finding(parallel=p, debug=opts.debug, appid=opts.appid, config_file=opts.yaml) api3.execute('findItemsAdvanced', {'keywords': 'php'}) apis.append(api3) p.wait() if p.error(): raise Exception(p.error()) for api in apis: print "Call Success: %s in length" % len(api.response_content()) print "Response code: %s" % api.response_code() print "Response DOM: %s" % api.response_dom() dictstr = "%s" % api.response_dict() print "Response dictionary: %s...\n" % dictstr[:50]
def run(opts): p = parallel() api1 = html(parallel=p, debug=opts.debug) api1.execute('http://jobs.intuit.com/search/advanced-search/ASCategory/Product%20Management/ASPostedDate/-1/ASCountry/-1/ASState/California/ASCity/-1/ASLocation/-1/ASCompanyName/-1/ASCustom1/-1/ASCustom2/-1/ASCustom3/-1/ASCustom4/-1/ASCustom5/-1/ASIsRadius/false/ASCityStateZipcode/-1/ASDistance/-1/ASLatitude/-1/ASLongitude/-1/ASDistanceType/-1') api2 = html(parallel=p, debug=opts.debug) api2.execute('https://highvolsubs-amazon.icims.com/jobs/search?ss=1&searchKeyword=&searchCategory=30651') api3 = html(parallel=p, debug=opts.debug) api3.execute('http://hire.jobvite.com/CompanyJobs/Careers.aspx?c=qMW9Vfww') api4 = html(parallel=p, debug=opts.debug) api4.execute('http://jobs.ebaycareers.com/search/product-manager/ASCategory/Product%20Management/ASPostedDate/-1/ASCountry/-1/ASState/California/ASCity/-1/ASLocation/-1/ASCompanyName/-1/ASCustom1/-1/ASCustom2/-1/ASCustom3/-1/ASCustom4/-1/ASCustom5/-1/ASIsRadius/false/ASCityStateZipcode/-1/ASDistance/-1/ASLatitude/-1/ASLongitude/-1/ASDistanceType/-1') api5 = html(parallel=p, debug=opts.debug) api5.execute('https://irecruitment.oracle.com/OA_HTML/OA.jsp?page=/oracle/apps/irc/candidateSelfService/webui/VisJobSchPG&_ri=821&SeededSearchFlag=N&Contractor=Y&Employee=Y&OASF=IRC_VIS_JOB_SEARCH_PAGE&_ti=345582308&retainAM=Y&addBreadCrumb=N&oapc=4&oas=HfwdjxRAvk-kqRstV7E-tA..') p.wait() if p.error(): raise(p.error()) msg = [ _intuit(api1), _amazon(api2), _tivo(api3), _ebay(api4), #_oracle(api5), ] msg.append("Other Job Boards\n") msg.append( "Mozilla Board:\nhttp://careers.mozilla.org/en-US/position/oUFGWfwV\n" ) msg.append( "Oracle Board:\nhttps://irecruitment.oracle.com/OA_HTML/OA.jsp?page=/oracle/apps/irc/candidateSelfService/webui/VisJobSchPG&_ri=821&SeededSearchFlag=N&Contractor=Y&Employee=Y&OASF=IRC_VIS_JOB_SEARCH_PAGE&_ti=345582308&retainAM=Y&addBreadCrumb=N&oapc=4&oas=HfwdjxRAvk-kqRstV7E-tA..\n" ) msg.append( "Amazon Board:\nhttps://www.a9.com/careers/?search_text=&group=Product%20Manager&type=\n" ) msg.append( "Yelp Board:\nhttp://www.yelp.com/careers\n" ) msg.append( "Intel Board:\nhttp://www.intel.com/jobs/jobsearch/index_js.htm?Location=200000016&JobCategory=30160190084\n" ) msg.append( "Electonic Arts:\nhttps://performancemanager4.successfactors.com/career?company=EA&career_ns=job_listing_summary&navBarLevel=JOB_SEARCH&_s.crb=hyfmSy2nuvCyziY826tSvCbNp08%3d\n" ) sess = smtplib.SMTP('smtp.gmail.com', 587) sess.starttls() sess.login('*****@*****.**', 'kum@@r') headers = [ "Subject: Bright New Future", "MIME-Version: 1.0", "Content-Type: text/plain" ] headers = "\r\n".join(headers) body = "\n".join(msg) body = body.encode('utf-8') sess.sendmail('*****@*****.**', ['*****@*****.**', '*****@*****.**'], "%s\r\n\r\n%s" %(headers, body)) sess.quit()