Jsoup getting background image path from css

前端 未结 3 2045
臣服心动
臣服心动 2021-01-19 07:23

I am looking for all of the images on a given website.

For this purpose i need to find the ones that are within the css for example:

   .gk-crop {
           


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 07:31

    Just like Niranjan mentioned, Jsoup is not for parsing CSS but XML. If you really need to extract some images from CSS, you will need to use some some 3rd party library for that purpose OR write simple regex for grabbing URLs from CSS file - its still plain text isn't it? This is not flexible resolution to your problem, but it would be the fastest one:)

提交回复
热议问题