I am attempting to control the code below by starting it from local time 9:30 PM to 4:00 AM. Additionally, I would like to run the web scraping process every 3 minutes. Could you please provide guidance on how to code this? If you have any ideas, please let me know.
{
“Name”: “Stock Price Capture”,
“CreationDate”: “2024-3-18”,
“Commands”: [
{
“Command”: “open”,
“Target”: “Tesla, Inc. (TSLA) 股價、新聞、報價和過往記錄 - Yahoo 財經”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “Price”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “Volume”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “csvSave”,
“Target”: “TeslaPrice”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “xpath=//[@id="quote-header-info"]/div[3]/div/div/fin-streamer",
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: "xpath=//[@id="quote-summary"]/div/table/tbody/tr[7]/td[2]”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “csvSave”,
“Target”: “TeslaPrice”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}