Finding elements in beautiful soup

i need to get the user from the a element and i have no idea how “last line in pic” PRESS TO SEE THE CODE

My code:

from bs4 import BeautifulSoup
import requests, lxml



class Scraper:

    def hastags_these(self, *hashtags):
        self.hashtag_list = []

        for hashtag in hashtags:
            self.hashtag_list.append(hashtag)
        print(self.hashtag_list)

    def get_hashtag_page(self):
        i = len(self.hashtag_list)
        lit = []
        for i in self.hashtag_list:
            self.page = requests.get(f'https://www.instagram.com/explore/tags/{self.hashtag_list[0]}/').text
            self.html_page = self.page
            self.soup = BeautifulSoup(self.html_page, 'html.parser')
            self.user = self.soup.select("body > div._2dDPU.CkGkG > div.zZYga > div > article > header > div.o-MQd > div.PQo_0 > div.e1e1d > span > a")




Scrap = Scraper()
Scrap.hastags_these('freelancer', 'python', 'java')
Scrap.get_hashtag_page()

what i am trying to do is search for users using one of these hashtags, the only remaning part is the username and idk how to do it

Answer

Understood, that you try to get something from that a tag what seems to be the username yunsx (as mentioned in the comments, it would be helpful to get more details)

Minimal Example

from bs4 import BeautifulSoup
html_doc ='''
<div class="e1e1d">
    <span class="some-class"</span>
        <a class="some-class" href="/yunsx/">
            yunsx
        </a>
    </span>
</div>
'''
soup = BeautifulSoup(html_doc, 'html.parser')

Get the a tag

userHref = soup.select('div.e1e1d > span > a')

Print results of attrs['href'] and its text.strip():

print('a href:'+userHref[0].attrs['href'])
print('a text:'+userHref[0].text.strip())

Output

a href:/yunsx/
a text:yunsx