[Python] Python webscraping: BeautifulSoup not showing all html source content

Discussão em 'Python' iniciado por Stack, Outubro 2, 2024.

  1. Stack

    Stack Membro Participativo

    I am quite new to webscraping and python. I was trying make a script that gets the Last Trade Price from http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?symbol=NFLX4333665&ticker=C647273 but some content seems to be missing when i request it with python. I have made scripts that got data from other websites successfully before, but i cant seem to get my code to work on this website.
    This is my code so far:

    from bs4 import BeautifulSoup
    import requests

    r = requests.get("http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?symbol=NFLX4333665&ticker=C647273")
    c = r.content
    soup = BeautifulSoup(c, "html.parser")

    all = soup.find_all("div", {"class": "gr_row_a5"})
    print(soup)



    when i run this most of the important data is missing.

    Any help would be much appreciated.

    Continue reading...

Compartilhe esta Página