Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

How to parse C-SPAN video links list from their search web-page?

$
0
0

For example: I want to parse all CNN news to get the unique links for every video that are available on C-SPAN webpage. By using search is quite easy to browse all of them (193 items), but it is not clear how to make it automatic.

The only way to show all items is to click "Load 20/100 more items"<a href="#" id="loadmore" class="button load-more search-load-more" data-page="3">Load 20 More</a>, but the function that are called from this button doesn't work properly through the console:

>searchResultsViewMore()
undefined
>searchResultsViewMore();
undefined
>this.searchResultsViewMore();
undefined

Here is the code of the function that loads rest of list data:

function searchResultsViewMore() {
$("#search-results").on("click", ".search-load-more", function (a) {
    a.preventDefault();
    if ($(this).hasClass("load-more-loading") || void 0 == $(this).data("page")) return !1;
    var k = $(this).closest("ul");
    a = $("#filter-search").attr("action");
    var d = $("#filter-search").serializeArray(),
        f = [];
    $.each(d, function (a, b) {
        f[b.name] = b.value
    });
    var d = $("#filter-search").serialize() + "&ajax&page=" + $(this).data("page"),
        c = $(this);
    $(c).addClass("load-more-loading").text("Loading");
    $.ajax({
        type: "GET",
        url: a,
        data: d,
        success: function (a) {
            $(c).closest("li").remove();
            0 < $(a).find("ul").length && $(k).append($(a).find("ul").html());
            "Mentions" == f.searchtype && loadMentionAjax()
        }
    })x
})
};

Where am I mistaken while calling function and how to get links or ID's of every available video from search page on C-SPAN?


Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>