Search code examples
androidhtmlweb-scrapingscrapyjsoup

getting Empty src while scraping


I am trying to Scrape Contents of A website using Jsoup. The HTML parsed by Jsoup has empty src attribute (i.e src="") while the when I inspect website in chrome it shows non-empty src(It is not being filled with javascript). It is not just a problem with just Jsoup, Scrapy return same results(empty src). I have tried adding custom user agent.

Can anybody tell what could be the reason of this problem and possible solutions. *I can not use methods like selenium cause I am seeking solution for android app development. Thanks!

Edit:

Site being used is flipkart.com i am scraping from its search result https://www.flipkart.com/search?q=xbox&marketplace=FLIPKART&sid=search.flipkart.com

Src from its "img" tag is being parsed empty.


Solution

  • The src attribute is empty. View Page Source in browser and search for the class. Then you will find the src attribute value empty. enter image description here