[Tutor] Beautifulsoup4 question

Juan Christian juan0christian at gmail.com
Thu Oct 2 03:44:18 CEST 2014


On Wed, Oct 1, 2014 at 9:37 PM, Juan Christian <juan0christian at gmail.com>
wrote:

> OH MY GOD! Super fail, hahaha.
>
> Thanks, bs4 is incredible. I thought they were RAW html data. Thank you!
>


Not everything is that easy, hahaha. So, I can get everything I want, but
this part:

<li "="" WHATEVER WHATEVER WHATEVER WHATEVER">
<div class="item-icon" style="background-image:url(
http://media.steampowered.com/apps/440/icons/wading_crate_2.dea09767ade382b0151eb6251d1e5b6deaf8ab75.png)"><div
class="value">#86</div></div><span style="display:
none"> WHATEVER </span></li>

I need this, the image link: background-image:url(NEED_THIS_LINK)

I need the image link, I have this in all "<li> items", how can I get that?
Sometimes it has a .PNG in the end and sometimes it's a '94x94' in the end,
as in here:
http://cdn.steamcommunity.com/economy/image/iRulfx1JB6hWyBlnfvJwHzFXb85ZOQnoggbKfZoUOLhAEJKERFVBuvYRBZlYkiyRKVA0ilcmCeyEDc1vmwQTvkAThpJsU1Kx92AKl0faKM86RyzaVSQWs9RQlyrSVHW5FkTa0gJUB7nzWlSTA9l91jsSItxWdxDgyRLNew==/94x94

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20141001/ef1d958a/attachment.html>


More information about the Tutor mailing list