dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: pull html content and style from other website

  1. #1
    Join Date
    Aug 2013
    Posts
    2

    pull html content and style from other website

    Hi,

    I'm trying to find a way to which I could pull content and style from array of website's.

    In simple words, I want to use commands such as:
    document.getElementById("somename")

    on specific url and not on my webpage.

    Can I do that?
    Incase not, what method should I use?

    Thank you,

    Doron

  2. #2
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,114
    Use PHP and a simple 'screenscraper'.

  3. #3
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,114

  4. #4
    Join Date
    Aug 2013
    Posts
    2

    Angry

    Thank you Donatello but the solution which you have offered isn't considering the style (which means CSS colors).
    I will try to be more specific in my needs:

    I would like to build a search engine which is running on URL's that I will provide. the output should be:
    1) the percentage of text colors in the page (for instance 10% black, 20% red, etc..)
    2) the percentages of the background colors in the page (related to the text color). for instance 10% of the page are DIV's with red background and white text.


    Any idea??!?

  5. #5
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,114
    You could do that with a screenscraper, but it would be a bit more advanced.
    First it would scan the site for the stylesheet - not hard.
    Then it would open the stylesheet.
    Then it would parse the stylesheet and get the colors.

    A screenscraper is what you want to build. I would recommend playing with PHP screenscrapers that use cURL or somesuch.
    You can probably hire someone to build it on eLance, but this is a more involved project than a simple screenscraper and nobody here will write one for you for free.

    Perhaps if you got it started by getting it to extract the CSS Stylesheet URL.
    You might interest someone into building a CSS analytic tool with you.

    You might want to play with this script:
    http://indesignsecrets.com/print-out...heet-specs.php

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles