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 6630221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:22:18+00:00 2026-05-25T22:22:18+00:00

i try to built an url checker using the google feed api. My problems:

  • 0

i try to built an url checker using the google feed api.

My problems:
1: the if(result) check doesn’t work. Maybe an async problem?
2: any ideas for the rss,audio/video podcast check? I’m sure, i get in the response an url to the audio/video file (but i’m blind at the moment).

My idea is to check this url.

// somthing like that
if(typeof xxxx == 'undefined') -> rss feed
if xxxx.match(/mp3|wav|XXX/gi) -> audio feed
if xxxx.match(/mpg|avi|flv/gi) -> video feed

JS

$(document).ready(function()
{
    // valid rss feed
    var result = urlCheck('http://www.bild.de/rssfeeds/vw-home/vw-home-16725562,short=1,sort=1,view=rss2.bild.xml');
    if(result){ console.warn('result1 is a '+result.urlIsA+' '); console.dir(result); }

    // valid video podcast
    var result = urlCheck('http://www.tagesschau.de/export/video-podcast/webl/tagesschau/');
    if(result){ console.warn('result1 is a '+result.urlIsA+' '); console.dir(result); }

    // valid audio podcast
    var result = urlCheck('http://chaosradio.ccc.de/chaosradio-latest.rss');
    if(result){ console.warn('result1 is a '+result.urlIsA+' '); console.dir(result); }

});
function urlCheck(url)
{
    var feed = new google.feeds.Feed(url);
    feed.setResultFormat(google.feeds.Feed.MIXED_FORMAT);
    feed.setNumEntries('1');
    feed.load(function(result)
    {
        if (!result.error)
        {
            var allEntries = result.feed.entries;
            console.info(url);
            console.dir(allEntries);

            /* if(XXX.match(/XXXX/,gi)) {
                allEntries.urlIsA = 'rss feed';
                return allEntries;
            }
            if(XXX.match(/XXXX/,gi)) {
                allEntries.urlIsA = 'audio podcast';
                return allEntries;
            }
            if(XXX.match(/XXXX/,gi)) {
                allEntries.urlIsA = 'video podcast';
                return allEntries;
            } */

            return false;
        }
        else { return false; }
    });
}

Working example
http://jsbin.com/unikak/edit#javascript,html

notice: your must copy the code in an *.html file, otherwise you get an error from jsBin

google.feeds.Feed is not a constructor
  • 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-25T22:22:19+00:00Added an answer on May 25, 2026 at 10:22 pm

    Change your RegExps, so that only mpg at the end of a string is matched:
    /(mpg|avi|flv/)$/gi

    Instead of using return, use callback functions:

    function urlCheck(url, callback){
    
    ....
    //Insread of return false:
    callback(false);
    //Instead of return true:
    callback(true);
    

    At your result checker:

    urlCheck("http://....", function(result){
        if(result){
             console.warn(...);
        } else {
           //..
        }
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I built a slideshow/decision-making game in Flash but would like to try to redo
How do I use F#'s built-in support for async operations classes exposing the Event-based
From NetBeans, I created a new REST webservice (using jersey), using the built-in wizards.
I have a mobile web application built using the following versions :- JQuery Mobile
How to open an URL from code in the built-in web browser rather than
I built an app using Django 1.3 and am now attempting to deploy to
I am using http://json.codeplex.com/ and I am talking to a Ruby based Rest API.
I try to build a gui (Swing) for a simple java application. The application
i try to build a app that is in landsscape mode all the time.
When I try to build my project I get the following message in the

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.