我想找到某个div的直接AS
BEGIN
SET NOCOUNT ON;
DECLARE @ID INT
INSERT INTO dbo.Registration_Table (StudentName, Email, CourseCode, CourseTitle)
VALUES (@StudentName, @Email, @CourseCode, @CourseTitle)
SELECT 2
END
GO
个孩子。我怎么能这样做?
.col.group
如何使用divs = response.css(div.container)
children = divs[0].css('>.col.group') # this doesn't work
和css
编写此内容?
谢谢。
答案 0 :(得分:3)
CSS没有当前节点概念。所以你可以用CSS做到这一点。但事情是Scrapy允许你混合CSS和XPATH。所以你可以很好地混合它们
divs = response.css(div.container)
children = divs[0].xpath('./*[contains(@class, 'col')]') # this doesn't work