Exemplo n.º 1
0
 def _get_long_info(self, company_name):
     profile = Linkedin()._company_profile(company_name)
     _profile = Zoominfo().search(company_name)
     print profile
     if type(profile) is str:
         profile = Zoominfo().search(company_name)
         logger.info("zoominfo company " + str(profile))
     if type(profile) is not str and type(_profile) is not str:
         profile['phone'] = _profile['phone']
     result = Parse()._add_company(profile, company_name)
     return profile
Exemplo n.º 2
0
 def _get_info(self, company_name, api_key=""):
     profile = Linkedin()._company_profile(company_name, api_key)
     if type(profile) is str:
         profile = Zoominfo().search(company_name, api_key)
         logger.info("zoominfo company " + str(profile))
     #result = Parse()._add_company(profile, company_name)
     return profile
Exemplo n.º 3
0
def _company_name_source():
    api_key = "9a31a1defcdc87a618e12970435fd44741d7b88794f7396cbec486b8"
    name = request.args["company_name"]

    if "facebook" in request.args["source"]:
      j9 = q.enqueue(Facebook()._company_profile, name, api_key,timeout=6000)
    elif "twitter" in request.args["source"]:
      j10 = q.enqueue(Twitter()._company_profile, name, api_key,timeout=6000)
    elif "indeed" in request.args["source"]:
      j11 = q.enqueue(Indeed()._company_profile, name, api_key,timeout=6000)
    elif "businessweek" in request.args["source"]:
      j0 =q.enqueue(BusinessWeek()._company_profile, name, api_key,timeout=6000)
    elif "zoominfo" in request.args["source"]:
      j1 = q.enqueue(Zoominfo()._company_profile, name, api_key,timeout=6000)
    elif "linkedin" in request.args["source"]:
      j2 = q.enqueue(Linkedin()._company_profile, name, api_key,timeout=6000)
    elif "yellowpages" in request.args["source"]:
      j3 = q.enqueue(YellowPages()._company_profile, name, api_key,timeout=6000)
    elif "yelp" in request.args["source"]:
      j4= q.enqueue(Yelp()._company_profile, name, api_key,timeout=6000)
    elif "forbes" in request.args["source"]:
      j5 = q.enqueue(Forbes()._company_profile, name, api_key,timeout=6000)
    elif "glassdoor" in request.args["source"]:
      j6 = q.enqueue(GlassDoor()._company_profile, name, api_key,timeout=6000)
    elif "hoovers" in request.args["source"]:
      j7 = q.enqueue(Hoovers()._company_profile, name, api_key,timeout=6000)
    elif "crunchbase" in request.args["source"]:
      j8 = q.enqueue(Crunchbase()._company_profile, name, api_key,timeout=6000)
    return {'started':True}
Exemplo n.º 4
0
 def _domain_research(self, domain, api_key="", name="", prospect_name=""):
     # Primary Research
     if name == "": name = domain
     x = 6000
     j1 = q.enqueue(Zoominfo()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j2 = q.enqueue(Linkedin()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j3 = q.enqueue(YellowPages()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j4 = q.enqueue(Yelp()._domain_search, domain, api_key, name, timeout=x)
     j5 = q.enqueue(Forbes()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j6 = q.enqueue(GlassDoor()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j7 = q.enqueue(Hoovers()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j8 = q.enqueue(Crunchbase()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j9 = q.enqueue(Facebook()._domain_search,
                    domain,
                    api_key,
                    name,
                    timeout=x)
     j10 = q.enqueue(Twitter()._domain_search,
                     domain,
                     api_key,
                     name,
                     timeout=x)
     j11 = q.enqueue(Indeed()._domain_search,
                     domain,
                     api_key,
                     name,
                     timeout=x)
     jobs = [j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11]
     for job in jobs:
         print "{0}_{1}".format(name, api_key)
         RQueue()._meta(job, "{0}_{1}".format(name, api_key), prospect_name)
Exemplo n.º 5
0
 def _research(self, name, api_key="", prospect_name=""):
     # Primary Research
     # Google Search and parse results
     j13 = q.enqueue(Companies()._google_search,
                     name,
                     api_key,
                     timeout=6000)
     j12 = q.enqueue(ClearbitSearch()._company_profile,
                     name,
                     api_key,
                     timeout=6000)
     j9 = q.enqueue(Facebook()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     j10 = q.enqueue(Twitter()._company_profile,
                     name,
                     api_key,
                     timeout=6000)
     j11 = q.enqueue(Indeed()._company_profile, name, api_key, timeout=6000)
     j0 = q.enqueue(BusinessWeek()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     j1 = q.enqueue(Zoominfo()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     j2 = q.enqueue(Linkedin()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     j3 = q.enqueue(YellowPages()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     j4 = q.enqueue(Yelp()._company_profile, name, api_key, timeout=6000)
     j5 = q.enqueue(Forbes()._company_profile, name, api_key, timeout=6000)
     j6 = q.enqueue(GlassDoor()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     j7 = q.enqueue(Hoovers()._company_profile, name, api_key, timeout=6000)
     j8 = q.enqueue(Crunchbase()._company_profile,
                    name,
                    api_key,
                    timeout=6000)
     jobs = [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13]
     for job in jobs:
         RQueue()._meta(job, "{0}_{1}".format(name, api_key), prospect_name)
Exemplo n.º 6
0
    def _google_search(self, name, api_key=""):
        c = Google().search(name)
        for link in c.link:
            print link
            if "facebook" in link:
                q.enqueue(Facebook()._url_to_dict,
                          name,
                          link,
                          api_key,
                          timeout=6000)
            elif "twitter" in link:
                q.enqueue(Twitter()._url_to_dict,
                          name,
                          link,
                          api_key,
                          timeout=6000)
            elif "indeed" in link:
                q.enqueue(Indeed()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "businessweek" in link:
                q.enqueue(BusinessWeek()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "zoominfo" in link:
                q.enqueue(Zoominfo()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "linkedin" in link:
                q.enqueue(Linkedin()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "yellowpages" in link:
                q.enqueue(YellowPages()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "yelp" in link:
                q.enqueue(Yelp()._company_profile, name, api_key, timeout=6000)
            elif "forbes" in link:
                q.enqueue(Forbes()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "glassdoor" in link:
                q.enqueue(GlassDoor()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "hoovers" in link:
                q.enqueue(Hoovers()._company_profile,
                          name,
                          api_key,
                          timeout=6000)
            elif "crunchbase" in link:
                q.enqueue(Crunchbase()._company_profile,
                          name,
                          api_key,
                          timeout=6000)

        d = c
        d = d[~d.link.str.contains("crunchbase|hoovers|forbes|glassdoor|yelp")]
        d = d[~d.link.str.contains("yellowpages|linkedin|zoominfo|businessweek"
                                   )]
        d = d[~d.link.str.contains("indeed|twitter|facebook")]
        if d.empty: return
        d = d.reset_index()
        for i, row in d.iterrows():
            print row.domain, "DOMAIN SEARCH"
            q.enqueue(Companies()._domain_search,
                      row.domain,
                      name,
                      api_key,
                      timeout=6000)
            if i > 5: break