Ejemplo n.º 1
0
 async def get_people(self, proxy=False):
     self.proxy = proxy
     rawres = myparser.Parser(self.totalresults, self.word)
     to_parse = await rawres.people_twitter()
     # fix invalid handles that look like @user other_output
     handles = set()
     for handle in to_parse:
         result = re.search(r'^@?(\w){1,15}', handle)
         if result:
             handles.add(result.group(0))
     return handles
Ejemplo n.º 2
0
    async def get_urls(self):
        try:
            rawres = myparser.Parser(self.totalresults, 'trello.com')
            self.trello_urls = set(await rawres.urls())
            self.totalresults = ''
            # reset what totalresults as before it was just google results now it is trello results
            headers = {
                'User-Agent': random.choice(['curl/7.37.0', 'Wget/1.19.4'])
            }
            # do not change the headers
            responses = await AsyncFetcher.fetch_all(self.trello_urls,
                                                     headers=headers,
                                                     proxy=self.proxy)
            for response in responses:
                self.totalresults += response

            rawres = myparser.Parser(self.totalresults, self.word)
            self.hostnames = await rawres.hostnames()
        except Exception as e:
            print(f'Error occurred: {e}')
Ejemplo n.º 3
0
 async def get_emails(self):
     rawres = myparser.Parser(self.total_results, self.word)
     toparse_emails = await rawres.emails()
     emails = set()
     # strip out numbers and dashes for emails that look like [email protected]
     for email in toparse_emails:
         email = str(email)
         if '-' in email and email[0].isdigit() and email.index('-') <= 9:
             while email[0] == '-' or email[0].isdigit():
                 email = email[1:]
         emails.add(email)
     return list(emails)
Ejemplo n.º 4
0
 async def get_hostnames(self):
     rawres = myparser.Parser(self.results, self.word)
     new_lst = []
     for host in await rawres.hostnames():
         host = str(host)
         if host[0].isdigit():
             matches = re.match('.+([0-9])[^0-9]*$', host)
             # Get last digit of string and shift hostname to remove ip in string
             new_lst.append(host[matches.start(1) + 1:])
         else:
             new_lst.append(host)
     return new_lst
Ejemplo n.º 5
0
 async def get_hostnames(self) -> list:
     parser = myparser.Parser(self.total_results, self.word)
     return await parser.hostnames()
Ejemplo n.º 6
0
 async def get_emails(self) -> set:
     parser = myparser.Parser(self.total_results, self.word)
     return await parser.emails()
Ejemplo n.º 7
0
 async def get_hostnames(self):
     rawres = myparser.Parser(self.totalresults, self.word)
     return await rawres.hostnames()
Ejemplo n.º 8
0
 async def get_emails(self):
     rawres = myparser.Parser(self.totalresults, self.word)
     return await rawres.emails()
Ejemplo n.º 9
0
 async def get_profiles(self):
     rawres = myparser.Parser(self.total_results, self.word)
     return await rawres.profiles()
Ejemplo n.º 10
0
 async def get_links(self):
     links = myparser.Parser(self.totalresults, self.word)
     return await splitter(await links.links_linkedin())
Ejemplo n.º 11
0
 async def get_people(self):
     rawres = myparser.Parser(self.totalresults, self.word)
     temp = await rawres.people_linkedin()
     return [person for person in temp
             if person[0] != '.' and '...' not in person and len(person.split()) != 1]
Ejemplo n.º 12
0
 async def get_hostnames(self, proxy=False):
     self.proxy = proxy
     rawres = myparser.Parser(self.total_results, self.word)
     return await rawres.hostnames()
Ejemplo n.º 13
0
 async def get_files(self):
     rawres = myparser.Parser(self.totalresults, self.word)
     return rawres.fileurls(self.files)