Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
Web Scraping ; How to render html after javascript run?

I am trying to scrape a list of tech Companies in Greater Noida from 'GlassDoor':

but Problem: Page changes its content after some seconds of load (may be using javascript).

Link: https://www.glassdoor.co.in/Explore/browse-companies.htm?overall_rating_low=3.5&page=1&isHiringSurge=0&locId=4475367&locType=C&locName=Greater%20Noida

you can change value of page in link.. give a try for that. after changing page no. i am rendering same first page content..after changing page no.!

from bs4 import BeautifulSoup
from selenium import webdriver

lst=[]

options = webdriver.ChromeOptions()
options.add_argument('--headless')

browser = webdriver.Chrome(options=options, executable_path='chromedriver.exe')

browser.get("https://www.glassdoor.co.in/Explore/browse-companies.htm?overall_rating_low=3.5&page=8&isHiringSurge=0&locId=4475367&locType=C&locName=Greater%20Noida")
html = browser.page_source
soup = BeautifulSoup(html, features="html.parser")
company_lst = soup.find_all('section', {'class': 'employerCard__EmployerCardStyles__employerCard'})

for item in company_lst:
    d={}
    d['Name'] = item.find('h2', {'data-test': 'employer-short-name'}).text
    d['Rating'] = item.find('span', {'data-test': 'rating'}).text
    d['Reviews-Count'] = item.find('div', {'data-test': 'cell-Reviews-count'}).text
    d['Salaries-Count'] = item.find('div', {'data-test': 'cell-Salaries-count'}).text
    d['Jobs-Count'] = item.find('div', {'data-test': 'cell-Jobs-count'}).text
    d['Industry'] = item.find('span', {'data-test': 'employer-industry'}).text
    print(d['Name'])
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Not sure why the page reloads to the First page. But you can try to click on the page number buttons like below(which works fine).

browser.get("https://www.glassdoor.co.in/Explore/browse-companies.htm?overall_rating_low=3.5&page=1&isHiringSurge=0&locId=4475367&locType=C&locName=Greater%20Noida")

for i in range(2,8):
    browser.find_element_by_xpath("//ul[contains(@class,'pagination')]//li/button[text()='{}']".format(i)).click()
    print(browser.current_url) # Prints the URL from page 2 to 7.
    time.sleep(5)
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda