Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Scraping

  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scraping

    Hello every one,
    I am using PHP Scraping to get the page html. but there is a problem that the page is loaded through ajax that takes some time to load.The file_get_html() get the html before the file is loaded.what i can do to solve this problem.


    Please help me to solve this problem .

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    You would write an javascript parser.
    PHP only cares about data. By scraping the page you get the html data, you need to write a way to parse the javascript to do what you want. If the link itself relies on JS to load it, then your only option is to parse it if you want to do something with it. I guarantee that it will not be fun to rewrite a javascript parser.


  •  

    Posting Permissions

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