Perhaps you can extract the span node?
td_tag.find('span').extract()
On Mon, Oct 15, 2012 at 12:18 PM, Osyrys Edmister
<
osyrys....@onereceipt.me> wrote:
> I've searched through the group and can not find what I'm looking for.
> Here's my issue.
>
> We are using Beautifulsoup to parse emails, I get a field with the value
>
> <td class="s2">Portland (2010)<br /> <span style="color:#999999;">Available
> to Ship: NOW</span></td>
>
> I need to remove the "<span style="color:#999999;">Available to Ship:
> NOW</span></td>" part...
>
> I've used .split('Available')[0], but this is not how the powers that be
> here would like it done since the text in that field can vary.
> Is there a way to search the text string and remove the span tag all
> together?
>
> Thanks in advance for any suggestions and assistance.
>
> Osyrys
>
> --
> You received this message because you are subscribed to the Google Groups
> "beautifulsoup" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/beautifulsoup/-/K37uijW8B98J.
> To post to this group, send email to
beauti...@googlegroups.com.
> To unsubscribe from this group, send email to
>
beautifulsou...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/beautifulsoup?hl=en.