# 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:


import json
import math
from json.decoder import JSONDecodeError
from theHarvester.lib.core import *
from theHarvester.parsers import myparser
            except JSONDecodeError:
                # sometimes error 502 from server
                continue

            try:
                response_items = json_response['data']['result']['items']
            except KeyError:
                if json_response.get("status", None) \
                        and json_response.get("error", None) == 24:
                    # https://www.qwant.com/anti_robot
                    print("Rate limit reached - IP Blocked until captcha is solved")
                    break
                continue

            for response_item in response_items:
                desc = response_item.get('desc', '')
                """
                response_item[0]['desc'] = "end of previous description."
                response_item[1]['desc'] = "john.doo@company.com start the next description"
                total_results = "end of first description.john.doo@company.com"
                get_emails() = "description.john.doo@company.com"
                """
                self.total_results += " "
                self.total_results += desc

    async def get_emails(self) -> set:
        parser = myparser.Parser(self.total_results, self.word)
        return await parser.emails()

    async def get_hostnames(self) -> list:

# 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/qwantsearch.py
import json
import math
from json.decoder import JSONDecodeError
from theHarvester.lib.core import *
from theHarvester.parsers import myparser

            except JSONDecodeError:
                # sometimes error 502 from server
                continue

            try:
                response_items = json_response['data']['result']['items']
            except KeyError:
                if json_response.get("status", None) \
                        and json_response.get("error", None) == 24:
                    # https://www.qwant.com/anti_robot
                    print("Rate limit reached - IP Blocked until captcha is solved")
                    break
                continue

            for response_item in response_items:
                desc = response_item.get('desc', '')
                """
                response_item[0]['desc'] = "end of previous description."
                response_item[1]['desc'] = "john.doo@company.com start the next description"
                total_results = "end of first description.john.doo@company.com"
                get_emails() = "description.john.doo@company.com"
                """
                self.total_results += " "
                self.total_results += desc

    async def get_emails(self) -> set:
        parser = myparser.Parser(self.total_results, self.word)
        return await parser.emails()

    async def get_hostnames(self) -> list:

        parser = myparser.Parser(self.total_results, self.word)