Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Extract code from the html source
Old 06-05-2008, 07:57 AM Extract code from the html source
Novice Talker

Posts: 12
Trades: 0
Hi!
I'd like to know, if any of you have any ideea, if there's a software that can extract the object code from the source of one sites. Or at least one page.
Basically, what I need is this:
Code:
<object>source code</object>
That would be great. Another thing would be to extract links from the source code - most of the link extractors are extracting, as far as I know, only href links, but I want all the links (e.g. those from scripts, iframes, etc)

Thank you!
__________________

Please login or register to view this content. Registration is FREE

Last edited by wattaman; 06-05-2008 at 07:58 AM..
wattaman is offline
Reply With Quote
View Public Profile Visit wattaman's homepage!
 
 
Register now for full access!
Old 06-05-2008, 08:42 AM Re: Extract code from the html source
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
You could write a custom php script to do this, what it sounds like though is you want to create a spider? That would be best written in C++ or another language like that.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 06-05-2008, 01:38 PM Re: Extract code from the html source
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
It also kind of depends on what you want to do with the extracted info. Do you want to store it somewhere, pass it to another page, delete it all together, or something else??
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 06-05-2008, 02:36 PM Re: Extract code from the html source
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Putting <object>tags</object> around something doesn't make it OOP. It sounds like what you want to do is use regular expressions to pull URLs out of a string.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-05-2008, 03:29 PM Re: Extract code from the html source
Novice Talker

Posts: 12
Trades: 0
Arenlor: Yes, some sort of spider. I have some programs, but all are extracting only the href links.
I'm looking for something a little more advanced, to spider and extract all the url adresses, not only the links, to be more exact. Like URLs from java script, objects etc. Those visible only in the source code.
Unfortunatelly, I'm not so smart to build my own software, thanks for the suggestion, though

angele803: can't see how relevant it is, but to answer you: something else.

Learning Newbie: something like this. Find all URLs in the source. However, if not possible, it would be OK if I could extract only the objects, or the scripts, etc. separatelly. Actually for the scripts I have a software, but it extracts only from a given page, doesn't scan an entirelly web address.

Meanwhile, I'll keep google-ing. I hope someone knows of such a software, though.

Thanks for your answers!
__________________

Please login or register to view this content. Registration is FREE
wattaman is offline
Reply With Quote
View Public Profile Visit wattaman's homepage!
 
Old 06-05-2008, 06:09 PM Re: Extract code from the html source
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
Quote:
Originally Posted by wattaman View Post
Arenlor:
angele803: can't see how relevant it is, but to answer you: something else.
The reason I asked is because there could be several different approaches you could take depending on the results you wanted.

Anyway, this wouldn't really be an HTML question - I could move it to the general coding forum if you want me to. You might find more help there.
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 06-06-2008, 03:16 PM Re: Extract code from the html source
Novice Talker

Posts: 12
Trades: 0
Quote:
Originally Posted by angele803 View Post
The reason I asked is because there could be several different approaches you could take depending on the results you wanted.

Anyway, this wouldn't really be an HTML question - I could move it to the general coding forum if you want me to. You might find more help there.
If you think it would help me find an answer faster (or if doesn't belong here), I'd appreciate if you'll move it.
Thank you!
__________________

Please login or register to view this content. Registration is FREE
wattaman is offline
Reply With Quote
View Public Profile Visit wattaman's homepage!
 
Reply     « Reply to Extract code from the html source
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.57514 seconds with 12 queries