Rectangle 27 3

If you want to add support for existing social network applications than I think all of the Bozho's solution would be ok for socializing your applications. For distance based calculations (geocoding) you will have to use separate mechanism and librabry google and yahoo both have an excellent api for that though these differ in terms of their usage restrictions so its good to you research before deciding one, Yahoo also supplies a promising feature YQL which is also useful in some cases.... Which one of them is better depends on your requirements... see following questions finding latitude and longitude, another similar question and finding distance between two zipCodes

If you want to create your own social networking site as then I think you will have to start by ur own... However It would be a nice idea to integrate that site with existing popular social networks using OAuth or open ID....

libraries - Java library for Social networking Application - Stack Ove...

java libraries
Rectangle 27 0

No, there is no way to fetch by month or for a date range. If you look at the YQL table fantasysports.leagues.scoreboard, you can see the parameters only accept the optional week parameter. This matches the Yahoo! Fantasy Sports API docs (search for 'scoreboard') which shows it can give results for the current week, or another specified week.

I think this is because the Yahoo! Fantasy Sports scoreboards are all week-based, regardless of the actual frequency of games for the specific sport.

To capture scores by month, you can make several individual calls for each week.

YQL Fantasy Hockey - League Standings by Month? - Stack Overflow

yql
Rectangle 27 0

SELECT url FROM search.web(0,60) WHERE query="stackoverflow"

Replace 60 with whatever other number your desire. Max is 500 afaik for the search.web YQL table because that is the limit of Yahoo BOSS which is used in this table.

You can also replace the 0 with e.g. 10, to skip the first 10 results. So using search.web(10,60) would still give you 60 results while skipping the first 10.

Also see the YQL documentation on remote limits - thats how this search.web(0,60) syntax is called.

how to get yahoo search result according to page number in YQL/pipes? ...

yql yahoo-pipes
Rectangle 27 0

You can use a region value when querying against the search.web table, like

select * from search.web where query="pizza" and region="in"

Available region values are listed in the Supported Regions and Languages for Web and News Search page for the Yahoo! BOSS API, which the search.web data table uses.

how to get results from Yahoo Ireland or Yahoo India search, using YQL...

yql
Rectangle 27 0

If you want to add support for existing social network applications than I think all of the Bozho's solution would be ok for socializing your applications. For distance based calculations (geocoding) you will have to use separate mechanism and librabry google and yahoo both have an excellent api for that though these differ in terms of their usage restrictions so its good to you research before deciding one, Yahoo also supplies a promising feature YQL which is also useful in some cases.... Which one of them is better depends on your requirements... see following questions finding latitude and longitude, another similar question and finding distance between two zipCodes

If you want to create your own social networking site as then I think you will have to start by ur own... However It would be a nice idea to integrate that site with existing popular social networks using OAuth or open ID....

libraries - Java library for Social networking Application - Stack Ove...

java libraries
Rectangle 27 0

google.customsearch

Thanks, but I am looking for something using Google's index. So not really a custom search for my website...unless you know of a way to make custom search work for the entire web?

Look at this thread: news.ycombinator.com/item?id=2712386 it seems you can do that with custom search.

Using YQL to perform a Google Search - Stack Overflow

search-engine yql google-search
Rectangle 27 0

No, Google does not offer an equivalent to YQL.

I wouldn't worry too much about "yahoo" versus "google", but instead see if the tool will help solve what you're trying to do.

yahoo - Does Google provide a search like YQL? - Stack Overflow

yahoo yql
Rectangle 27 0

$(function() {

    function search(term) {
        var query = 'SELECT title FROM search.web WHERE query="' + term + '"',
            url = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) + '&format=json&diagnostics=true&callback=cbfunc';

        $.get(url, function(data) {
            $('#searchResults').html(data);
        });
    }

    $('#search').live('submit', function() {
        search($('#searchInput').val());
        return false;
    });

});

As you can see, the response data is not JSON - that's why $.getJSON() does not work. For instance, if you search for "cars", you will get this response:

cbfunc({"query":{"count":10,"created":"2011-02-21T20:40:16Z","lang":"en-US","diagnostics":{"publiclyCallable":"true","url":{"execution-time":"779","content":"http://boss.yahooapis.com/ysearch/web/v1/cars?format=xml&start=0&count=10"},"user-time":"781","service-time":"779","build-version":"11323"},"results":{"result":[{"title":"New & Used Cars for Sale, Auto Dealers, Car Reviews and Car ..."},{"title":"Cars (Movie)"},{"title":"AutoTrader"},{"title":"New Cars, Used Cars, Blue Book Values & Car Prices - Kelley ..."},{"title":"Automobile - Wikipedia, the free encyclopedia"},{"title":"Car Allowance Rebate System (CARS)"},{"title":"Used Cars - Used Car Prices, Used Car Values & Reviews ..."},{"title":"Edmunds.com"},{"title":"Cars For Sale, Used Cars For Sale, New Cars For Sale ..."},{"title":"Research New Cars & Used Cars : Automobile Prices, Specs ..."}]}}});

Oh, I am sorry I didn't notice that you had already updated it. That fixed the undefined issue, but do you also know how I could display the YQL results? If you are not sure how to solve my YQL issues, I will still accept you answer as the correct one when I am able because you did fix the undefined issue.

Thanks for your help @ime Vidas! If you know how I might solve my YQL issues, feel free to let me know! Thanks again!

Oh, sorry again that I didn't notice you updated your answer. Thank you for pointing out that it is not JSON. I suppose I will have to try to learn how to extract values from JSONP now. Thanks for all your help @ime Vidas!

javascript - Undefined Value Returned for Text Input and Display YQL Q...

javascript jquery json yql
Rectangle 27 0

The only way to retrieve YQL results via client-side JavaScript is JSON-P (or by using an additional proxy). Here's a wrapper for the YQL service:

function YQLQuery(query, callback) {
    this.query = query;
    this.callback = callback || function(){};
    this.fetch = function() {

        if (!this.query || !this.callback) {
            throw new Error('YQLQuery.fetch(): Parameters may be undefined');
        }

        var scriptEl = document.createElement('script'),
            uid = 'yql' + +new Date(),
            encodedQuery = encodeURIComponent(this.query.toLowerCase()),
            instance = this;

        YQLQuery[uid] = function(json) {
            instance.callback(json);
            delete YQLQuery[uid];
            document.body.removeChild(scriptEl);
        };

        scriptEl.src = 'http://query.yahooapis.com/v1/public/yql?q='
                     + encodedQuery + '&format=json&callback=YQLQuery.' + uid; 
        document.body.appendChild(scriptEl);

    };
}
// Construct your query:
var query = "select * from rss where url='somefeed.com' limit 1";

// Define your callback:
var callback = function(data) {
    var post = data.query.results.item;
    alert(post.title);
};

// Instantiate with the query:
var firstFeedItem = new YQLQuery(query, callback);

// If you're ready then go:
firstFeedItem.fetch(); // Go!!

How could I use tables in datatables.org with this method?

javascript - How to use YQL to retrieve web results? - Stack Overflow

javascript html search yql
Rectangle 27 0

The 'Truncate' module controls how many results pass through it.

The website http://bishop.comxa.com/ uses this method to control how many results appear on the page.

Yahoo pipes:Using YQL to search a specific string in a website - Stack...

yahoo yahoo-pipes
Rectangle 27 0

I'm not completely sure, but you can use the YQL with Google Image Search

Do you have example for that. Or can you describe it a little bit more detailed?

json - javascript OCR API - Stack Overflow

javascript json api ocr
Rectangle 27 0

Following changes with the Yahoo Pipes V2 'upgrade' some YQL tables have been dropped.

Thankfully some new ones have appeared but are not widely known about yet.

SELECT * FROM microsoft.bing.web WHERE query="pizza india"

how to get results from Yahoo Ireland or Yahoo India search, using YQL...

yql
Rectangle 27 0

http://query.yahooapis.com/v1/public/yql?
q=select%20*%20from%20html%20where%20url%3D%27https%3A%2F%2F
www.google.com/search?q=Google+Guice&ie=utf-8%27%0A&format=json

The URL query parts are separated into the following (separated by &):

+--------+---------------------------------------------------+
| q      | select%20*%20from%20html%20where%20url%3D%27https |
|        | %3A%2F%2Fwww.google.com/search?q=Google+Guice     |
+--------+---------------------------------------------------+
| ie     | utf-8%27%0A                                       |
+--------+---------------------------------------------------+
| format | json                                              |
+--------+---------------------------------------------------+

As you can see, YQL is not receiving the full query string as you wanted it to. This is because the & character that should be part of the query string has not been url-encoded to %26.

Guice%26ie=utf

Aside: There are a few other issues that you are going to face. The first is that the Google search URL embedded into the query is malformed since it will contain a literal space character between Google and Guice, which Google does not accept. Secondly, the URL is restricted by Google's robots.txt so even if the URL is fixed, you won't be able to get any results from there.

url - YQL | why I'm getting a syntax error? - Stack Overflow

url yahoo yql yahoo-api
Rectangle 27 0

The older Google Search API that the google.search YQL table uses has been deprecated by Google. It's still running, but I think there is a 100 query/day limit. When you see no results in YQL console, it likely means that it's being rate-limited.

As an alternative you might try using the newer Google Custom Search API. Note that it's only free up to 100 queries/day, but they offer a paid plan above that.

Yeah, I was thinking that also. It just seems terribly inconsistent to return what seems like a valid result that is essentially invalid.

YQL Google Search inconsistent results - Stack Overflow

yql
Rectangle 27 0

See the YQL website itself for this. Search google for YQL and CSS (I can only post one link in here and the 2nd one is more useful.)

The example they have there is actually no longer working but you can try out this example, which scrapes the questions from the frontpage of stackoverflow.

Multiple Selects with one XPATH:

You CAN do this directly with xpath syntax. e.g.

SELECT * FROM html WHERE url="www.asscompact.de" and xpath="//head/meta[@name='title']|//head/meta[@name='description']|//head/meta[@name='keywords']"

Thanks, wasn't sure about the syntax but that's cleared it up.

Upvoted .. I figured this out myself but wanted to know if I can give a space or something between the result of two xPaths, so that later I could parse the result and get two different values.

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

php - How to use multiple xpath selectors in a YQL query - Stack Overf...

php yql xpath
Rectangle 27 0

Other non-BOSS search APIs such as Web Search, Image Search, News Search, Related Suggestion, and Site Explorer APIs will shut down with no further support in YQL.

so, how can I get authenticated to retrieve data/ statuses from twitter?

PHP cURL: retrieve search data from yahoo/ google api? - Stack Overflo...

php curl twitter
Rectangle 27 0

public class Movie
{
    public string Year { get; set; }
    public string Title { get; set; }
    public string[] Genre { get; set; }
}

class Program
{
    static void Main(string[] args)
    {
        string url = System.Net.WebUtility.UrlDecode("https://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20html%20WHERE%20url%3D%22http%3A%2F%2Fthemoviedb.org%2Fsearch%2Fmovie%3Fquery%3Dsplit%22%20%20AND%20xpath%3D%27%2F%2Fdiv%5B%40class%3D%22info%22%5D%27&format=json&callback=");
        HttpClient cl = new HttpClient();
        var response = cl.GetStringAsync(url).Result;
        JObject json = JObject.Parse(response);

        var movies = new List<Movie>();

        foreach (var pchild in json["query"]["results"]["div"])
        {
            // title
            var title = pchild["p"][0]["a"]["title"];
            var titleStr = title != null ? title.Value<string>() : string.Empty;

            // year
            var releaseDate = pchild["p"][1]["span"][0]["content"];
            string releaseYear = string.Empty;

            DateTime temp;
            if (releaseDate != null
                && DateTime.TryParse(releaseDate.Value<string>(), System.Globalization.CultureInfo.InvariantCulture, DateTimeStyles.None, out temp))
            {
                releaseYear = temp.Year.ToString();
            }

            // genres
            var genre = pchild["p"][1]["span"][1]["content"];
            var genreArr = genre != null
                            ? genre.Value<string>()
                                .Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)
                                .Select(st => st.Trim())
                                .ToArray()
                            : new string[0];

            movies.Add(
                new Movie
                {
                    Title = titleStr,
                    Year = releaseYear,
                    Genre = genreArr
                });
        }


        // searching for the best match
        string titleFilter = "Split";
        string yearFilter = "2017";
        var genreFilter = new string[] { "Drama", "Thriller", "Action" };

        var bestMatches = movies
                            .OrderByDescending(m => m.Title == titleFilter)
                            .ThenByDescending(m => m.Year == yearFilter)
                            .ThenByDescending(m => m.Genre.Intersect(genreFilter).Count());

        // the best match
        var bestMatch = bestMatches.First();
        Console.WriteLine(bestMatch.Title);
        Console.WriteLine(bestMatch.Year);
        Console.WriteLine(string.Join(",", bestMatch.Genre));


        // all the movies already ordered
        //foreach (var movie in bestMatches)
        //{
        //    Console.WriteLine(movie.Title);
        //    Console.WriteLine(string.Join(",", movie.Genre));
        //    Console.WriteLine(movie.Year);
        //    Console.WriteLine();
        //}

        Console.ReadLine();
    }
string titleFilter = "Split";  
string yearFilter = "2017";  
var genreFilter = new string[] { "Drama", "Thriller", "Action" };
Split    
2017    
Drama,Horror,Thriller

Note that you may have several movies with the same matches. Input:

string titleFilter = "Split";
string yearFilter = "2016";
var genreFilter = new string[] { "Drama", "Thriller", "Action" };

Best matches (you can uncomment the last part of code to see all the movies ordered):

Split  
Fantasy,Drama  
2016  

Split  
Drama  
2016

hello Pedro, I found a bug on your pattern... if the Json object is exactly one your code crashes. see what I mean with this link - query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20html%20WHERE%20url%3D'https%3A%2F%2Fwww.themoviedb.org%2Fsearch%2Fmovie%3Fquery%3DResident%2BEvil:%2BThe%2BFinal%2BChapter'%20AND%20xpath%3D'%2F%2Fdiv%5B%40class%3D%22info%22%5D'&format=json&callback= and to get around it you have to remove the for each loop and access the value direct but doing that will only give you one object in a case you have more than one objects.

I can not access to this url. I have an Query Syntax error. Can you please verify the url?

c# - Select the Object with linq that best fit the Query strings - Sta...

c# json linq