Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

274
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!