$startStr = "<span class=`"Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(ib)`" data-reactid=`"31`">"; $endStr = "</span>"; ## <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This will need to be changed every time Yahoo changes where price is located
It's not working for me. I've been entering the quotes directly into the quotes for the last three days. Should I enter them in the quotes archives too. Some of them only go to 5/27/21.
# --------------------------------------------- # Identifying price # --------------------------------------------- #Price is in this string: 174.96 $startStr = ""; $endStr = ""; #Price is in this string: data-reactid="32">75.73 $startStr = ""; $endStr = ""; ## <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This will need to be changed every time Yahoo changes where price is located
The "Interday" update works for me. Just work carefully, and make sure you are using (and Saving) the modification to the correct script file.
Note to emptyquarter: If the price data range is seen in the Yahoo website, and your scripts are up to snuff, one thing you can do is "Clean house" by MOVING some (or all) your "*.txt: files out of your current "Quotes" folder and paste them somewhere else on your system. Save these files somewhere completely outside of the "Portfolioslicer Folder. Keep the files in case you you want to reverse this test.
Next time you run the UpdatePSData.bat file, everything inside the "Quotes" folder will be re-created, including the Archive data files. (If you moved the "Quotes" sub-folder from within the PortfolioSlicer folder, you might need to create a new empty "Quotes" sub-folder before updating)
BB
(After using PortfolioSlicer for many years, I'm still amazed how easy it is to track exactly what my financial world is doing. Many, many thanks again to Vidas)
One item to note on the reactid value: It appears that the value is geographically specific. I'm in the US. If I connect my VPN to a Canadian city, reactid=31 works fine when I run the script. If I connect from the US sans VPN, then I have to use 49 (previously it was 50) since 31 isn't found.
Hi, Thank you for this fix, it works fine for me. I have issue retrieving the exchange rates when running intraday update. Is there a similar fix in order to retrieive the exchange rates as well?
Is anyone else experiencing errors running UpdatePSData.bat today (Aug 10)? Mine worked flawlessly yesterday, but today I received the following error (once per symbol it seems) and corrupted my Quotes.csv file: Exception calling "ParseExact" with "3" argument(s): "String was not recognized as a valid DateTime." At C:\PortfolioSlicer\Scripts\psFunctions.ps1:19 char:13 + $nextDate = ([datetime]::ParseExact($lastDateInFile,"yyyy ... + ``````````````````````````````````````````````````````````````````````````````````````````` I tried deleting the corrupted Quotes.csv file, but re-running UpdatePS Data gave the same errors and a newly corrupted Quotes file. Any suggestions?
Quotes.csv is recreated every time you run .bat file. First review folder QuotesIntraDay\*.txt and make sure that issue is not in that intraday file. Then review per symbol files Quotes\Symbol.txt - check last line and confirm that date is OK and not corrupted.
Comments
script GetQuotes-YahooIntraday.ps1
Line 41 old: Replace with line 41 new:
Please post here if this fix works.
It's not working for me. I've been entering the quotes directly into the quotes for the last three days. Should I enter them in the quotes archives too. Some of them only go to 5/27/21.
# ---------------------------------------------
# Identifying price
# ---------------------------------------------
#Price is in this string: 174.96
$startStr = ""; $endStr = "";
#Price is in this string: data-reactid="32">75.73
$startStr = ""; $endStr = ""; ## <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This will need to be changed every time Yahoo changes where price is located
Note to emptyquarter: If the price data range is seen in the Yahoo website, and your scripts are up to snuff, one thing you can do is "Clean house" by MOVING some (or all) your "*.txt: files out of your current "Quotes" folder and paste them somewhere else on your system. Save these files somewhere completely outside of the "Portfolioslicer Folder. Keep the files in case you you want to reverse this test.
Next time you run the UpdatePSData.bat file, everything inside the "Quotes" folder will be re-created, including the Archive data files. (If you moved the "Quotes" sub-folder from within the PortfolioSlicer folder, you might need to create a new empty "Quotes" sub-folder before updating)
BB
(After using PortfolioSlicer for many years, I'm still amazed how easy it is to track exactly what my financial world is doing. Many, many thanks again to Vidas)
Thank you for this fix, it works fine for me. I have issue retrieving the exchange rates when running intraday update. Is there a similar fix in order to retrieive the exchange rates as well?
Mine worked flawlessly yesterday, but today I received the following error (once per symbol it seems) and corrupted my Quotes.csv file:
Exception calling "ParseExact" with "3" argument(s): "String was not recognized as a valid DateTime."
At C:\PortfolioSlicer\Scripts\psFunctions.ps1:19 char:13
+ $nextDate = ([datetime]::ParseExact($lastDateInFile,"yyyy ...
+ ```````````````````````````````````````````````````````````````````````````````````````````
I tried deleting the corrupted Quotes.csv file, but re-running UpdatePS Data gave the same errors and a newly corrupted Quotes file.
Any suggestions?
First review folder QuotesIntraDay\*.txt and make sure that issue is not in that intraday file.
Then review per symbol files Quotes\Symbol.txt - check last line and confirm that date is OK and not corrupted.
$price = GetTxtBetween $str "x) D(ib)`" data-reactid=`"31`">" "</span>"; # Getting price/exchange value