mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-22 12:09:35 +08:00
Open page with field name variable
This commit is contained in:
parent
69810329ce
commit
c410513b4d
@ -650,6 +650,12 @@ class BrowserThread(Thread):
|
||||
self.outputParameters[key] = ""
|
||||
else:
|
||||
url = list(filter(isnull, para["links"].split("\n")))[0]
|
||||
pattern = r'Field\["([^"]+)"\]' # 将value中的Field[""]替换为outputParameters中的键值
|
||||
try:
|
||||
replaced_text = re.sub(pattern, lambda match: self.outputParameters.get(match.group(1), ''), url)
|
||||
except:
|
||||
replaced_text = url
|
||||
url = replaced_text
|
||||
try:
|
||||
maxWaitTime = int(para["maxWaitTime"])
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user