So here goes my second issue:
The main site has sections like this:
Code:
div class='fpdocument'
div class='section'
ul
li -> a -> article1
li -> a ->article2
...
which I was able to extract via
Code:
for section in soup.findAll('div', attrs={'class':'fpdocument'}):
# processing section_title stripped, then finding articles
articles = []
for post in section.findAll('li'):
# processing articles stripped (but it just works(tm)
But now I recognized, that some section(s) has only one article, and in that case the structure is:
Code:
div class='fpdocument'
a class='section'
a -> article1
end div
How to extract those articles?
Thanks in advance!