Thanks a lot for discussions in this thread. Although none of the solutions solved the problem I have, it gives me valuable clues to finally allow me continue automatically download from yahoo financial site a list of tickers in a format that can be easily converted into csv format. For those who know how to program, it is easy. Otherwise, please do not bother to read the following. Here is what I do:
1. use your browser either google chrome or firefox;
2. create a yahoo account, and log in, and create a portfolio. You can add upto 1000 tickers into each portfolio.
3. create a view to customize the display for the portfolio. for example, you can select: ticker, open, high, low, last, vol, time.
3. you can manually download the web page into a single html file by selection "Save as: Web Page, Complete". (Wait this is not automatic yet. I will tell how to make it automatic if you continue to read). In the browsers's address bar, you could see the URL such as - https://finance.yahoo.com/portfolio/<your-fortfolio-id>/view/view_<your-view-id>, copy it to be used for later automatic download.
4. After you get the html file, use the program "html2text" (free available for Linux/Unix platform) or use lynx -dump <the html file>. You get the text format of the quote table. From there, it is easy to convert the table into a csv format or anything you like if you know how to write a script (python, or anything you like).
To make the above download automatic, that is, write a simple program (robot) to do downloading by simulating the clicks and keyboard types. Use the free tool automatic-save-as (from github.com) and xvkbd.
The problem I cannot use curl or wget or lynx is they do not support full web page downloading into a single web html file (or I still do not find a way to use them correctly) even I added cookies.txt to start programs.
1. use your browser either google chrome or firefox;
2. create a yahoo account, and log in, and create a portfolio. You can add upto 1000 tickers into each portfolio.
3. create a view to customize the display for the portfolio. for example, you can select: ticker, open, high, low, last, vol, time.
3. you can manually download the web page into a single html file by selection "Save as: Web Page, Complete". (Wait this is not automatic yet. I will tell how to make it automatic if you continue to read). In the browsers's address bar, you could see the URL such as - https://finance.yahoo.com/portfolio/<your-fortfolio-id>/view/view_<your-view-id>, copy it to be used for later automatic download.
4. After you get the html file, use the program "html2text" (free available for Linux/Unix platform) or use lynx -dump <the html file>. You get the text format of the quote table. From there, it is easy to convert the table into a csv format or anything you like if you know how to write a script (python, or anything you like).
To make the above download automatic, that is, write a simple program (robot) to do downloading by simulating the clicks and keyboard types. Use the free tool automatic-save-as (from github.com) and xvkbd.
The problem I cannot use curl or wget or lynx is they do not support full web page downloading into a single web html file (or I still do not find a way to use them correctly) even I added cookies.txt to start programs.