# Path: theHarvester/parsers/myparser.py
# class Parser:
#     def __init__(self, results, word):
#     async def genericClean(self):
#     async def urlClean(self):
#     async def emails(self):
#     async def fileurls(self, file):
#     async def hostnames(self):
#     async def people_googleplus(self):
#     async def hostnames_all(self):
#     async def links_linkedin(self):
#     async def people_linkedin(self):
#     async def people_twitter(self):
#     async def profiles(self):
#     async def set(self):
#     async def urls(self):
#     async def unique(self) -> list:


from theHarvester.discovery.constants import *
from theHarvester.parsers import myparser
import asyncio
    async def do_search_profiles(self):
        urly = 'http://' + self.server + '/search?num=' + self.quantity + '&start=' + str(
            self.counter) + '&hl=en&meta=&q=site:www.google.com%20intitle:\"Google%20Profile\"%20\"Companies%20I%27ve%20worked%20for\"%20\"at%20' + self.word + '\"'
        try:
            headers = {'User-Agent': googleUA}
            resp = await AsyncFetcher.fetch_all([urly], headers=headers, proxy=self.proxy)
        except Exception as e:
            print(e)
        self.results = resp[0]
        if await search(self.results):
            try:
                self.results = await google_workaround(urly)
                if isinstance(self.results, bool):
                    print('Google is blocking your ip and the workaround, returning')
                    return
            except Exception:
                # google blocked, no useful result
                return
        await asyncio.sleep(get_delay())
        self.totalresults += self.results

    async def get_emails(self):
        rawres = myparser.Parser(self.totalresults, self.word)
        return await rawres.emails()

    async def get_hostnames(self):
        rawres = myparser.Parser(self.totalresults, self.word)
        return await rawres.hostnames()

    async def get_files(self):

# Path: theHarvester/parsers/myparser.py
# class Parser:
#     def __init__(self, results, word):
#     async def genericClean(self):
#     async def urlClean(self):
#     async def emails(self):
#     async def fileurls(self, file):
#     async def hostnames(self):
#     async def people_googleplus(self):
#     async def hostnames_all(self):
#     async def links_linkedin(self):
#     async def people_linkedin(self):
#     async def people_twitter(self):
#     async def profiles(self):
#     async def set(self):
#     async def urls(self):
#     async def unique(self) -> list:


# Path: theHarvester/discovery/googlesearch.py
from theHarvester.discovery.constants import *
from theHarvester.parsers import myparser
import asyncio

    async def do_search_profiles(self):
        urly = 'http://' + self.server + '/search?num=' + self.quantity + '&start=' + str(
            self.counter) + '&hl=en&meta=&q=site:www.google.com%20intitle:\"Google%20Profile\"%20\"Companies%20I%27ve%20worked%20for\"%20\"at%20' + self.word + '\"'
        try:
            headers = {'User-Agent': googleUA}
            resp = await AsyncFetcher.fetch_all([urly], headers=headers, proxy=self.proxy)
        except Exception as e:
            print(e)
        self.results = resp[0]
        if await search(self.results):
            try:
                self.results = await google_workaround(urly)
                if isinstance(self.results, bool):
                    print('Google is blocking your ip and the workaround, returning')
                    return
            except Exception:
                # google blocked, no useful result
                return
        await asyncio.sleep(get_delay())
        self.totalresults += self.results

    async def get_emails(self):
        rawres = myparser.Parser(self.totalresults, self.word)
        return await rawres.emails()

    async def get_hostnames(self):
        rawres = myparser.Parser(self.totalresults, self.word)
        return await rawres.hostnames()

    async def get_files(self):

        rawres = myparser.Parser(self.totalresults, self.word)