# Path: theHarvester/discovery/linkedinsearch.py
# class SearchLinkedin:
#     def __init__(self, word, limit):
#     async def do_search(self):
#     async def get_people(self):
#     async def get_links(self):
#     async def process(self, proxy=False):
# 
# Path: theHarvester/discovery/constants.py
# async def splitter(links):
#     """
#     Method that tries to remove duplicates
#     LinkedinLists pulls a lot of profiles with the same name.
#     This method tries to remove duplicates from the list.
#     :param links: list of links to remove duplicates from
#     :return: unique-ish list
#     """
#     unique_list = []
#     name_check = []
#     for url in links:
#         tail = url.split("/")[-1]
#         if len(tail) == 2 or tail == "zh-cn":
#             tail = url.split("/")[-2]
#         name = tail.split("-")
#         if len(name) > 1:
#             joined_name = name[0] + name[1]
#         else:
#             joined_name = name[0]
#         if joined_name not in name_check:
#             unique_list.append(url)
#             name_check.append(joined_name)
#     return unique_list


from theHarvester.discovery import linkedinsearch
from theHarvester.discovery.constants import splitter
import os
import re
import pytest
#!/usr/bin/env python3
# coding=utf-8

pytestmark = pytest.mark.asyncio
github_ci = os.getenv('GITHUB_ACTIONS')  # Github set this to be the following: true instead of True


class TestGetLinks(object):

    async def test_splitter(self):
        results = [
            'https://www.linkedin.com/in/don-draper-b1045618',
            'https://www.linkedin.com/in/don-draper-b59210a',
            'https://www.linkedin.com/in/don-draper-b5bb50b3',
            'https://www.linkedin.com/in/don-draper-b83ba26',
            'https://www.linkedin.com/in/don-draper-b854a51'
        ]

# Path: theHarvester/discovery/linkedinsearch.py
# class SearchLinkedin:
#     def __init__(self, word, limit):
#     async def do_search(self):
#     async def get_people(self):
#     async def get_links(self):
#     async def process(self, proxy=False):
# 
# Path: theHarvester/discovery/constants.py
# async def splitter(links):
#     """
#     Method that tries to remove duplicates
#     LinkedinLists pulls a lot of profiles with the same name.
#     This method tries to remove duplicates from the list.
#     :param links: list of links to remove duplicates from
#     :return: unique-ish list
#     """
#     unique_list = []
#     name_check = []
#     for url in links:
#         tail = url.split("/")[-1]
#         if len(tail) == 2 or tail == "zh-cn":
#             tail = url.split("/")[-2]
#         name = tail.split("-")
#         if len(name) > 1:
#             joined_name = name[0] + name[1]
#         else:
#             joined_name = name[0]
#         if joined_name not in name_check:
#             unique_list.append(url)
#             name_check.append(joined_name)
#     return unique_list


# Path: tests/discovery/test_linkedin_links.py
from theHarvester.discovery import linkedinsearch
from theHarvester.discovery.constants import splitter
import os
import re
import pytest

#!/usr/bin/env python3
# coding=utf-8

pytestmark = pytest.mark.asyncio
github_ci = os.getenv('GITHUB_ACTIONS')  # Github set this to be the following: true instead of True


class TestGetLinks(object):

    async def test_splitter(self):
        results = [
            'https://www.linkedin.com/in/don-draper-b1045618',
            'https://www.linkedin.com/in/don-draper-b59210a',
            'https://www.linkedin.com/in/don-draper-b5bb50b3',
            'https://www.linkedin.com/in/don-draper-b83ba26',
            'https://www.linkedin.com/in/don-draper-b854a51'
        ]

        filtered_results = await splitter(results)