If you want to find an anchor with these two classes, you will have to use a regex, I think:
tags = soup.findAll('a', attrs={'class': re.compile(r'\binlinesave\b.*\baction\b')})
Keep in mind that this regular expression will not work if the class name ordering is canceled ( class="action inlinesave").
The following statement should work for all cases (although it looks ugly imo.):
soup.findAll('a',
attrs={'class':
re.compile(r'\baction\b.*\binlinesave\b|\binlinesave\b.*\baction\b')
})
source
share