I'm experimenting with http://robobrowser.readthedocs.org/en/latest/readme.html, a new python library based on the beautiful soup library.
I have the following HTML:
I have the following django view function
def index(request):
p=str(request.POST.get('p', False)) # eg. p='https://www.yahoo.com/'
browser = RoboBrowser(history=True)
postedmessage = browser.open(p)
out = browser.select('span.select')
return HttpResponse(postedmessage)
out yields:
<span class="select"><a href="/selector/1">select</a></span>
But how do I select the inner tag using beautiful soup?