不幸的是,我一直在尝试使用下面提供的此修补代码对Web爬网程序进行编码,但是,它正在回显在网站上看到的起始文本,而不是我特别要求其提取的文本
不知道我在哪里做错了
代码为:
DECLARE @i INT, @TrackId INT
SET @i = 1;
SET @TrackId = (SELECT MIN(Id) FROM emp)
SELECT @TrackId
WHILE (@i <= (SELECT MAX(Id) FROM emp))
BEGIN
DECLARE @tempEmp TABLE ( Id INT, [name] VARCHAR(50))
INSERT INTO @tempEmp
(Id ,[name] )
SELECT TOP 2 E.Id, [E].[name]
FROM dbo.emp E
WHERE E.Id >= @TrackId
ORDER BY E.Id ASC
UPDATE
t
SET t.[name] = s.[name]
FROM dbo.emp t
JOIN @tempEmp TE ON TE.Id = t.id
JOIN empref s ON t.Id = s.Id
PRINT @@ROWCOUNT;
SET @TrackId = (SELECT MAX(Id) FROM @tempEmp)
SET @i = @i + 1;
END;
我要解析的URL是“ https://soovle.com/top/”
感谢您的帮助。