re.compile and array class filters don't work on multiple class names
Bug #1476868 reported by
Brandon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Undecided whether this is actually by design or a bug, however per this StackOverflow question, it needs clarification: http://
In short, given this code:
```
from bs4 import BeautifulSoup
import re
soup = BeautifulSoup(
results1 = soup.findAll('div', re.compile(r'l4 center'));
print results1
results2 = soup.findAll('div', ['l4 center']);
print results2
results3 = soup.findAll('div', 'l4 center');
print results3
```
Only results3 gives a result. Shouldn't the other two return the same result?
Changed in beautifulsoup: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Yes, they should. This is fixed in revision 417.