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

191
Views
¿Por qué Selenium solo rastrea 50 fotos de Instagram?

Hice un rastreador de imágenes usando la función de búsqueda de etiquetas de Instagram con selenio. Y agregó una función de desplazamiento. Sin embargo, existía el problema de que solo se podían guardar un máximo de 50 imágenes. Entonces, si reviso la lista de publicaciones después de desplazarme, el elemento anterior se elimina y el índice comienza desde 1 nuevamente. ¿Hay alguna forma de guardar más fotos? ¿Es porque Instagram lo restringe o las especificaciones de mi computadora son malas?

ingrese la descripción de la imagen aquí ingrese la descripción de la imagen aquí

 SCROLL_PAUSE_TIME = 3 while True: html = driver.page_source soup = BeautifulSoup(html, 'html.parser') time.sleep(3) posts = soup.select('.v1Nh3.kIKUG._bz0w') time.sleep(5) for v in range(1, len(posts)): print("\n==== index ==== : ", v) last_height = driver.execute_script('return document.body.scrollHeight') driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") time.sleep(SCROLL_PAUSE_TIME) new_height = driver.execute_script("return document.body.scrollHeight") if new_height == last_height: driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") time.sleep(SCROLL_PAUSE_TIME) new_height = driver.execute_script("return document.body.scrollHeight") if new_height == last_height: break else: last_height = new_height continue for index, post in enumerate(posts): print('https://www.instagram.com/' + post.a['href']) imgUrl = post.select_one('.KL4Bh').img['src'] with urlopen(imgUrl) as f: with open('./22ss/' + plusUrl + str(index) + '.jpg', 'wb') as h: image = f.read() h.write(image) print(imgUrl) print()
about 4 years ago · Juan Pablo Isaza
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!