I need a simple script that will perform the following tasks:
1) Scrape dividend data from the following pages (for previous day)
[login to view URL];client=aol
2) Compare and consolidate data
3) Insert unique records into a database. If the record (date. ticker) already exists, do not insert.
Here is a sample insert query:
INSERT INTO `db_name`.`div_Dividend` (
`StockTicker` ,
`CompanyName` ,
`DividendAnnouncementDate` ,
`DividendRecordDate` ,
`DividendPayDate` ,
`DividendAmountPerShare` ,
`updateTime`
)
VALUES (
'FL', 'Foot Locker, Inc.', '2008-07-15', '2008-07-18', '2008-08-01', '.15', '2008-07-15'
);
4) Ensure the data is clean. You need to include some error checking in the code to make sure the data completely accurate--only numerical values.
5) I would like to run the script from 1/1/08 until today.