On Tue, Oct 7, 2014 at 7:50 PM, Danny Yoo <d...@hashcollision.org> wrote:

> Hi Juan,
>
> I think you're looking for:
>
>     http://effbot.org/zone/element.htm#searching-for-subelements
>
> where you should be able to do something like:
>
>     sml._xml.findtext('steamID64')
>
> to get the text "76561198084537782".
>
>
> Let's check:
>
> ###################################################################
> >>> import xml.etree.ElementTree
> >>> import urllib
> >>> f = urllib.urlopen("
> http://steamcommunity.com/profiles/76561198084537782?xml=1";)
> >>> tree = xml.etree.ElementTree.ElementTree(file=f)
> >>> tree.findtext('steamID64')
> '76561198084537782'
> ###################################################################
>
>
> Yup, this looks relatively straightforward.  Let us know if you hit any
> snags.
>

Exactly what I needed, thanks!
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to