I am using Scrapy to crawl a site. I am trying to select an element in the response.
My response object contains HTML that looks like this:
<html>
<head><title>Title goes here</title</head>
<body>
<!-- lots of stuff I am not interested in -->
<select class="Gy(t)">
<!-- elements -->
</select>
<!-- lost more stuff of no interest to me -->
</body>
</html>
My code:
def parse(self, response):
# ....
print (response.selector.css('select.Gy(t)'))
I got the folowing exception thrown when I run my code:
"Expected selector, got %s" % (peek,))
File "<string>", line None
cssselect.parser.SelectorSyntaxError: Expected selector, got <DELIM '(' at 9>
How can I use a selector (preferably a CSS selector) to select this HTML element?