Not able to extract href from anchor tag using python Beautifulsoup

Viewed 46

Currently I am working on Facebook group posts scraping part In which I want to scrape the Facebook group post URL.

I am using BeautifulSoup with Selenium to achieve this part, but I am stuck in between. Please refer to the first picture here I am trying to extract link from anchor tag using BeautifulSoup, but whenever selenium scripts run its show only "#" as output not the whole link.

Image link

soup = BeautifulSoup(driver.page_source, "html.parser")

        a_tags = soup.find_all("a", attrs={"class": "qi72231t nu7423ey n3hqoq4p r86q59rh b3qcqh3k fq87ekyn bdao358l fsf7x5fv rse6dlih s5oniofx m8h3af8h l7ghb35v kjdc1dyq kmwttqpk srn514ro oxkhqvkx rl78xhln nch0832m cr00lzj9 rn8ck1ys s3jn8y49 icdlwmnq jxuftiz4 cxfqmxzd tes86rjd"})
        for a in a_tags:

            print("i am href",a.get("href"))
            

This is the code where I am trying to debug what's coming in the output.

i am href #

This is output coming every time selenium scripts run.

Please help!

0 Answers
Related