Skip to content

Instantly share code, notes, and snippets.

@Talljoe
Created April 3, 2011 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Talljoe/900198 to your computer and use it in GitHub Desktop.
Save Talljoe/900198 to your computer and use it in GitHub Desktop.
~Oklahoma and fosil fuels~. ~fosill fuels~: http://nswarc.co.uk/myron-fosill-fuels//1296720000
Fosil Fuel | Flickr - Photo Sharing!: http://www.flickr.com/photos/thomashawk/3910488337//1298707200
Fossil fuel - Wikipedia, the free encyclopedia: http://en.wikipedia.org/wiki/Fossil_fuel/1301554800
Answers.com - What is fosil fuels: http://wiki.answers.com/Q/What_is_fosil_fuels/1301122800
USING VARIOUS KINDS OF FOSIL FUEL [KEPCO]: http://www.kepco.co.jp/english/fuel/siyounen1_e.html/1254380400
Fosils found on the big dig boston. oklahoma and fosil fuels ...: http://pronafcap.net/bates-oklahoma-and-fosil-fuels//1297238400
Suluh fosil - Wikipédia: http://su.wikipedia.org/wiki/Suluh_fosil/1291190400
Answers.com - Is peat a fosil fuel: http://wiki.answers.com/Q/Is_peat_a_fosil_fuel/1297152000
Oklahoma and fosil fuels, adjusting a fosil watch band: http://www.prairieartist.com/dori-3-important-fosils-discoveries-in-south-africa//1298448000
Nivi fosili u nivom vinodolskom [fosil porn vintage. fosill fuels]: http://florental.com/negril-fosill-fuels//1299139200
namespace Scratch
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Xml.Linq;
internal class Resource
{
public string Title { get; set; }
public string Date { get; set; }
public string Url { get; set; }
public Resource(string title, string date, string url)
{
Title = title;
Date = date;
this.Url = url;
}
}
internal class Program
{
private static void Main(string[] args)
{
var url = "http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=YahooDemo&query=fosil+fuel";
List<Resource> sites;
var request = WebRequest.Create(url);
using (var response = request.GetResponse())
{
// Get the response stream
var xmlDoc = XDocument.Load(response.GetResponseStream());
var results = from q in xmlDoc.Descendants(XName.Get("Result", "urn:yahoo:srch"))
select new Resource(
q.Element(XName.Get("Title", "urn:yahoo:srch")).Value,
q.Element(XName.Get("ModificationDate", "urn:yahoo:srch")).Value,
q.Element(XName.Get("ClickUrl", "urn:yahoo:srch")).Value);
sites = results.ToList();
}
foreach (var site in sites)
{
Console.WriteLine("{0}: {1}/{2}", site.Title, site.Url, site.Date);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment