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:

    def get_hashtag_page(self):
        i = len(self.hashtag_list)
        lit = []
        for i in self.hashtag_list:
   = requests.get(f'{self.hashtag_list[0]}/').text
            self.html_page =
            self.soup = BeautifulSoup(self.html_page, 'html.parser')
            self.user ="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')

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


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/">
soup = BeautifulSoup(html_doc, 'html.parser')

Get the a tag

userHref ='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())


a href:/yunsx/
a text:yunsx