Bug #1739
Figure why selector doesn't match
Start date:
02/11/2017
Due date:
% Done:
100%
Description
Try a selector of "#siteTable .title" on https://www.reddit.com/r/Splunk/new/. It shows matches and it matches in a browser manually. However, it produces no results.
Associated revisions
Fixing no matches on some IDs
Fixing no matches on selectors using non-lowercase IDs
Reference #1739
History
#1 Updated by Luke Murphey almost 8 years ago
Repro:
| webscrape selector="#siteTable .title" url="https://www.reddit.com/r/Splunk/new/"
This doesn't work either:
| webscrape selector="#siteTable .title" url="https://www.reddit.com/r/Splunk/new/" browser="firefox"
#2 Updated by Luke Murphey almost 8 years ago
To check:
- Is the selector getting passed through
- Can this be reproduced via a simple Python script?
#3 Updated by Luke Murphey almost 8 years ago
I cannot match on #siteTable.
#4 Updated by Luke Murphey almost 8 years ago
The issue is that I am making the selector lowercase in the SelectorField class. This is because CSS selectors ought to match without respect to case ("DIV" and "div" should match identically).
#5 Updated by Luke Murphey almost 8 years ago
Some options:
- See if a newer version of CSS select addresses this
- Use BeautifulSoup
- Change the selector to match both (given and lowercase)
#6 Updated by Luke Murphey almost 8 years ago
#7 Updated by Luke Murphey almost 8 years ago
- % Done changed from 0 to 30
#8 Updated by Luke Murphey almost 8 years ago
cssselector 1.0.1 does not change the behavior.
#9 Updated by Luke Murphey almost 8 years ago
- Status changed from New to Closed
- % Done changed from 30 to 100