226337 Extract/Grab Data
N/A
Dibayar semasa penghantaran
I need categories and listings scraped from [url removed, login to view]
and inserted to mysql database
plz see below db structure and sample of data.
CREATE TABLE `categories` (
`id` int(21) NOT NULL auto_increment,
`name` varchar(100) NOT NULL,
`parent` int(21) default '1',
`lft` int(10) NOT NULL,
`rgt` int(10) NOT NULL,
`date` int(21) NOT NULL,
`disp_subs` enum('true','false') NOT NULL default 'false',
`link_count` int(10) NOT NULL,
`count_last_upd` int(20) NOT NULL,
`path` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` VALUES(1, 'root', NULL, 1, 48, 0, 'true', 0, 0, 'root');
INSERT INTO `categories` VALUES(3, 'Accountancy', 1, 2, 7, 1211803751, 'true', 0, 1211993308, 'accountancy');
CREATE TABLE `links` (
`id` int(21) NOT NULL auto_increment,
`category` int(21) NOT NULL,
`url` varchar(255) NOT NULL,
`name` varchar(64) NOT NULL,
`description` text NOT NULL,
`approved` enum('true','false') NOT NULL default 'false',
`submit_name` varchar(70) default NULL,
`submit_email` varchar(70) default NULL,
`clicks` int(21) NOT NULL,
`date` int(21) NOT NULL,
`dateapproved` int(21) default NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `url` (`url`,`name`,`description`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `links`
--
INSERT INTO `links` VALUES(1, 25, '[url removed, login to view]', 'test', 'test', 'true', NULL, NULL, 0, 1211805375, NULL);
u can just put placeholder for these fields as follows:
`lft` = 0
`rgt` = 0
`disp_subs` = true
`link_count` = 0
`count_last_upd` = 1211993308
`submit_name` = NULL
`clicks` = 0
`submit_email` = IT IS EMAIL ADDRESS FROM LISTING: e-mail business - in a href link u can grab email address of the listing
URL should be taken from listing page "Visit Our Web Site" link has URL like [url removed, login to view] - we need this.
example: in this listing: [url removed, login to view]
URL from Visit Our Site is "[url removed, login to view]" - so we insert [url removed, login to view] to URL.
let me know if u have questions.
ID Projek: #1972575