Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:21:40+00:00 2026-05-28T07:21:40+00:00

I would like to write a scraping script to retrieve comments from cnn articles.

  • 0

I would like to write a scraping script to retrieve comments from cnn articles. For example, this article: http://www.cnn.com/2012/01/19/politics/gop-debate/index.html?hpt=hp_t1

I realize that cnn uses disqus for their comment discussion. As the comment loading is not webpage-based (ie, prev page, next page) and is dynamic (ie, need to click “load next 25”), I have no idea how to retrieve all the 5000+ comments for this article.

Any idea or suggestion?

Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:21:40+00:00Added an answer on May 28, 2026 at 7:21 am

    The option for scraping (other then getting the page), which might be less robust (depends on you’re needs) but will offer a solution for the problem you have, is to use some kind of wrapper around a full fledged web browser and literally code the usage pattern and extract the relevant data. Since you didn’t mention which programming language you know, I’ll give 3 examples: 1) Watir – ruby, 2) Watin – IE & Firefox via .net, 3) Selenium – IE via C#/Java/Perl/PHP/Ruby/Python

    I’ll provide a little example using Watin & C#:

    IE browser = new IE();
    browser.GoTo(YOUR CNN URL);
    List visibleComments = Browser.List(Find.ById("dsq-comments"));
    //do your scraping thing
    Link moreComments = Browser.Link(Find.ByClass("dsq-paginate-append-text");
    moreComments.click();
    //wait util ajax ended by searching for some indicator
    Browser.WaitUntilContainsText(SOME TEXT);
    //do your scraping thing
    

    Notice:
    I’m not familiar with disqus, but it might be a better option to force all the comments to show by looping the Link & click parts of the code I posted until all the comments are visible and the scrape the List element dsq-comments

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to write a url from Original URL www.xyz.com/folder/articles?id=1221 to rewrite URL
I would like to write Python script, which will get i.e. 100 news/texts from
I would like to write the following Bash Script: When installing LAMP like this,
Would like to write a script to detect the file size of the target
I would like to write a script that can receive e-mail and then do
I would like to write a jQuery plugin to animate a background-size property from
I would like write a script in Powerbuilder 11.5 in order to read Excel
I would like to write a greasemonkey script to disable a div on a
I would like to write a setup script for my PHP application, which dose
I would like to write a program or script that would generate .vcproj and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.