def get_urls(self): print('\tSearching Trello Urls..') try: rawres = myparser.parser(self.totalresults, "trello.com") trello_urls = rawres.urls() visited = set() for url in trello_urls: # iterate through trello urls gathered and visit them, append text to totalresults if url not in visited: # make sure visiting unique urls visited.add(url) self.totalresults += requests.get(url=url, headers={'User-Agent': googleUA}).text rawres = myparser.parser(self.totalresults, self.word) return rawres.hostnames(), trello_urls except Exception as e: print("Error occurred: " + str(e))
def get_people(self): rawres = myparser.parser(self.totalresults, self.word) return rawres.people_linkedin()
def get_hostnames(self): rawres = myparser.parser(self.totalresults, self.word) return rawres.hostnames()
def get_set(self): rawres = myparser.parser(self.totalresults, list) return rawres.set()
def get_files(self): rawres = myparser.parser(self.totalresults, self.word) return rawres.fileurls(self.files)
def get_emails(self): rawres = myparser.parser(self.totalresults, self.word) return rawres.emails()
def get_people(self): rawres = myparser.parser(self.totalresults, self.word) return rawres.people_twitter()
def get_profiles(self): rawres = myparser.parser(self.totalresults, self.word) return rawres.profiles()
def test_emails(self): word = 'domain.com' results = '@domain.com***a@domain***banotherdomain.com***[email protected]***[email protected]***' p = myparser.parser(results, word) emails = sorted(p.emails()) self.assertEqual(emails, ['*****@*****.**', '*****@*****.**'])