# 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
        self.word = word
        self.results = ""
        self.totalresults = ""
        self.server = 'www.google.com'
        self.dorks = []
        self.links = []
        self.database = 'https://www.google.com/search?q='
        self.quantity = '100'
        self.limit = limit
        self.counter = start
        self.proxy = False

    async def do_search(self):
        # Do normal scraping.
        urly = 'http://' + self.server + '/search?num=' + self.quantity + '&start=' + str(
            self.counter) + '&hl=en&meta=&q=%40\"' + 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]
        searched = await search(self.results)
        if searched:
            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 as e:

# 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

        self.word = word
        self.results = ""
        self.totalresults = ""
        self.server = 'www.google.com'
        self.dorks = []
        self.links = []
        self.database = 'https://www.google.com/search?q='
        self.quantity = '100'
        self.limit = limit
        self.counter = start
        self.proxy = False

    async def do_search(self):
        # Do normal scraping.
        urly = 'http://' + self.server + '/search?num=' + self.quantity + '&start=' + str(
            self.counter) + '&hl=en&meta=&q=%40\"' + 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]
        searched = await search(self.results)
        if searched:
            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 as e:

                print(e)