Problems? Is your data what you think it is? | |
PerlMonks |
Re: extracting from web and adding to csv file with their linksby frozenwithjoy (Priest) |
on Jul 06, 2012 at 03:28 UTC ( [id://980205]=note: print w/replies, xml ) | Need Help?? |
OK, since I'm not entirely sure what you need, perhaps you could elaborate. To start, this is the first few lines from one of the output files:
Are you wanting to change "Chart, Profile, More" into "Chart, Profile, More"? If so, since you are only collecting the text and not links from the yahoo pages, your best bet is to harvest the symbols (e.g., BAC) from what you have and stick them into Yahoo's link template (e.g. http://finance.yahoo.com/q/bc?s=INSERT_SYMBOL_HERE for Charts). Assuming this is what you are trying to do, I wrote to following as a proof-of-concept and used it to replace print US $lin[1];:
The output looks like:
If this is what you are going for, you should elaborate on so that it reports links for 'Profile' and 'More' for all your output files. One other thing... You are saving your files as csv, but the data you output is not comma-delimited (unless you only want 3 columns).
In Section
Seekers of Perl Wisdom
|
|