Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

273
Visualizações
python scraping for javascript not working and specific data

to begin, i wanted to scrape this table that load from java script and i only want to scrape specific row of data such as base on Fund abbreviation or search base on that, but my basic script here is not working well. please help

from bs4 import BeautifulSoup
from requests_html import HTMLSession
session = HTMLSession()
url = 'https://www.publicmutual.com.my/Our-Products/UT-Fund-Prices'
r = session.get(url)
r.html.render()
soup=BeautifulSoup(r.html.html,'html.parser')
table = soup.find('table', attrs={'class':'fundtable col-sm-12'})
print(table) 

how do i make this work and scrape information only certain rows that i wanted based on the fund name or fund abbreviation column?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you go in chromedevtools and check for the url that render the table you will see the html of the table as follow: HTML

The website perform a post request to get the data

If you need that your scraping application been fast you have to map the payload and scrapy with python-requests and bs4. If speed is not a problem you can use python-Selenium

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda