| | #1 |
| SpiderCon War Room Member Join Date: 2012 Location: Earth
Posts: 194
Thanks: 30
Thanked 17 Times in 16 Posts
|
Hi there, I was trying to figure this out for more than one day with no success... I am using simple html dom and this is what my code looks like. Code: <?php
include('simple_html_dom.php');
$html = file_get_html('http:// zameen. com/Profile/Islamabad-Patiala_Associates-28879-1.html');
$emailid = $html->find('.s:22', 0);
echo $emailid;
?> Code: <script language="javascript">var stats_data_obj_agent = 'a:1:{s:16:"agent_phone_view";a:1:{i:137839;a:18:{s:4:"ph_v";i:1;s:11:"with_a_logo";i:1;s:8:"featured";i:1;s:5:"loc_2";s:4:"1562";s:5:"loc_3";s:1:"3";s:6:"cat_id";s:1:"3";s:12:"agent_userid";s:6:"137839";s:12:"company_name";s:16:"Test Estate";s:13:"company_phone";s:14:"+1-2345678";s:12:"company_cell";s:14:"+1-2345678";s:13:"company_email";s:22:"abcd1234@gmail.com";s:9:"is_active";i:1;s:9:"curr_code";s:3:"USD";s:5:"actid";N;s:7:"actname";N;s:8:"actphone";N;s:7:"actcell";N;s:8:"actemail";N; } '; </script> |
| |
| | #2 |
| VIP Warrior War Room Member Join Date: 2006 Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
|
You need to execute the JS. But anyway, you're not trying to scrape email addresses are you? |
| |
| | #3 |
| SpiderCon War Room Member Join Date: 2012 Location: Earth
Posts: 194
Thanks: 30
Thanked 17 Times in 16 Posts
|
I am trying to scrape email and few other values from this page for a local free directory project
|
| |
| | #4 |
| VIP Warrior War Room Member Join Date: 2006 Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
|
Yeah, scraping emails is kinda illegal.
|
| |
| | #5 |
| VIP Warrior War Room Member Join Date: 2008
Posts: 1,768
Thanks: 4,644
Thanked 1,335 Times in 894 Posts
|
that's why it is so much better to use a contact form on a website rather than post a live email address link - don't do it or you'll have people like the OP scraping them and using them for their own nefarious reasons |
| --------------- | |
| |
| | #6 |
| Advanced Warrior Join Date: 2010 Location: Lawrenceville GA
Posts: 685
Thanks: 52
Thanked 153 Times in 117 Posts
|
Scraping emails on your own site is fine. Scraping them from a domain you do not own can be bad. It is not illegal to scrape emails, the problem comes that unless you have a very slick targeting regex to get your emails your going to have a potential for a ton of dirty emails.Not to mention it is considered bad practice to not have some kind of permission. Example of good scraping. Software company X is looking for the administrator emails of domains who utilize X brand of software. They use search results obtained from Google to generate a list of people using product X and who have contact info on their page. They use that list and generate a initial contact to those leads. Yes perfectly 100% legal. Example of bad scraping. Pulling all email addresses of a web page you do not own. Yes perfectly 100% legal. |
|
Ralph Smith Mercenary development and deployment. | |
| |
|
| Bookmarks |
| Tags |
| address, dom, email, html, javascript, simple |
| |