Results 1 to 6 of 6
  1. #1

    how do I extract content from source genarated by javascript .?

    I need to extract content generated with javascript from a site , I cannot extract the data considering the source because always show the content look like :
    <script type="text/javascript" src="java1.js"></script>
    <script type="text/javascript" src="java2.js"></script>
    the content generated with those java1.js and java2.js so I need to extract the html source generated with this js scripts

    I can extract the content manully using firefox by selection the contents then right click then chose "view selection source" , I am looking for a perl, or python or whatever language can do same by itself ?

    thank you

  2. #2
    Join Date
    Feb 2005
    It's been discussed before at some length, eg. here. In short, it's not a trivial problem and Crowbar would probably be the place to start.

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  3. #3
    Quote Originally Posted by foobic View Post
    It's been discussed before at some length, eg. here. In short, it's not a trivial problem and Crowbar would probably be the place to start.
    I couldn't find the solution there
    anyone help me ??

  4. #4
    Join Date
    Aug 2002
    Superior, CO, USA
    There are entire companies dedicated to extracting content from other web pages, including JavaScript. It is not a trivial problem.

    Your best bet is to have the site that your extracting from implement some sort of RSS or other feed that is more easily read. Trying to implement a JavaScript engine to read text could easily be very problematic.
    Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

  5. #5
    Join Date
    Sep 2005
    Follow these steps:

    1. Get Firefox
    2. Install Web Developer Toolbar -
    3. View Generate Source
    Darsh Web Solutions : Web Design, PHP Development, E-Commerce Solutions

    PHP Tutorials : Tutorials and scripts for beginners

  6. #6
    Join Date
    Feb 2003
    You could probably use something like Watir to drive a real browser (firefox, ie), and parse the contents of the page after rendering. You would need to do a little Ruby-fu.

Similar Threads

  1. News Content Source
    By shockuk in forum Web Design and Content
    Replies: 3
    Last Post: 12-07-2006, 07:25 PM
  2. Using preg_match to extract content
    By szarwell in forum Programming Discussion
    Replies: 2
    Last Post: 09-25-2005, 04:48 AM
  3. Is there an open source content management system?
    By echazen in forum Web Design and Content
    Replies: 4
    Last Post: 09-19-2004, 10:53 PM
  4. Javascript: Background image source
    By JPortal in forum Programming Discussion
    Replies: 1
    Last Post: 01-27-2004, 12:34 PM
  5. can not extract content of tar ball using file manager
    By kipasa in forum Hosting Security and Technology
    Replies: 4
    Last Post: 10-03-2003, 12:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts