mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-20 04:39:57 +08:00
replace variables
This commit is contained in:
parent
8c3a613014
commit
c9eb5b0932
@ -1071,6 +1071,9 @@ class BrowserThread(Thread):
|
||||
break
|
||||
elif int(node["parameters"]["loopType"]) == 3: # 固定文本列表
|
||||
textList = node["parameters"]["textList"].split("\n")
|
||||
if len(textList) == 1: # 如果固定文本列表只有一行,现在就可以替换变量
|
||||
textList = replace_field_values(
|
||||
node["parameters"]["textList"], self.outputParameters).split("\n")
|
||||
for text in textList:
|
||||
text = replace_field_values(text, self.outputParameters)
|
||||
# self.recordLog("当前循环文本|Current loop text:", text)
|
||||
@ -1092,6 +1095,9 @@ class BrowserThread(Thread):
|
||||
# tempList = node["parameters"]["textList"].split("\r\n")
|
||||
urlList = list(
|
||||
filter(isnotnull, node["parameters"]["textList"].split("\n"))) # 去空行
|
||||
if len(urlList) == 1: # 如果固定网址列表只有一行,现在就可以替换变量
|
||||
urlList = replace_field_values(
|
||||
node["parameters"]["textList"], self.outputParameters).split("\n")
|
||||
# urlList = []
|
||||
# for url in tempList:
|
||||
# if url != "":
|
||||
|
Loading…
x
Reference in New Issue
Block a user