yahoo.search.factory (version 1.11, Tue Sep 11 15:33:28 MDT 2007) | index /home/leif/hack/pysearch/yahoo/search/factory.py

`Search Factory - simple API to create search objects
This module implements a few convenience functions to make it easy and safe
to create search objects. This is not the most efficient way to use the web
services, but it's convenient. Future releases of the APIs will hopefully
also make this factory implementation less cumbersome.`

Modules

``

yahoo.search.audio yahoo.search.image | yahoo.search.local yahoo.search.news | yahoo.search.site yahoo.search.term | yahoo.search.video yahoo.search.web

Functions

``

create_search(name, app_id, xml_parser=None, result_factory=None, debug_level=0, **args)
  `Create a Yahoo Web Services object, and configure it
  This is a simple "factory" function to instantiate and configure
  a Yahoo Web Services object. For example:
  app_id = "YahooDemo"
  srch = create_search("Web", app_id, query="Yahoo", results=4)
  if srch is not None:
  dom = srch.get_results()
  The first argument is one of the following "classes" of searches:
  Web - Web search
  Context - Contextual Web search
  Related - Web search Related Suggestions
  Spelling - Web search Spelling Suggestions
  Video - Video search
  Image - Image search
  News - News article search
  Local - Local search
  Term - Term extraction service
  Artist - Find information on a musical performer
  Album - Find information about albums
  Song - Provide information about songs
  SongDownload - Find links to various song providers of a song
  Podcast - Search for a Podcast site/feed
  PageData - Find all pages belonging to a domain
  InlinkData - Show pages linking to a specific page
  The second argument, app_id (or appid), is an application specific
  identifier, provided by Yahoo. The web services will not accept any
  requests without a proper AppID.
  All other arguments must be valid named arguments, and the allowed
  set of parameters depends on the specific class of search being
  instantiated. See http://developer.yahoo.net/search/ for a more
  comprehensive list and documentation of allowed parameters for all
  types of searches.`

Data

``

SERVICES = {'album': (<class 'yahoo.search.audio.AlbumSearch'>, 'Search for a specific music album'), 'artist': (<class 'yahoo.search.audio.ArtistSearch'>, 'Information on a musical performer'), 'context': (<class 'yahoo.search.web.ContextSearch'>, 'Contextual Web Search'), 'image': (<class 'yahoo.search.image.ImageSearch'>, 'Image Search'), 'inlinkdata': (<class 'yahoo.search.site.InlinkData'>, 'Show pages linking to a specific page'), 'local': (<class 'yahoo.search.local.LocalSearch'>, 'Local Search'), 'news': (<class 'yahoo.search.news.NewsSearch'>, 'News Search'), 'pagedata': (<class 'yahoo.search.site.PageData'>, 'Find all pages belonging to a domain'), 'podcast': (<class 'yahoo.search.audio.PodcastSearch'>, 'Search for a Podcast site/feed'), 'related': (<class 'yahoo.search.web.RelatedSuggestion'>, 'Web Search Related Suggestion'), ...}
__author__ = 'Leif Hedstrom <leif@ogre.com>'
__date__ = 'Tue Sep 11 15:33:28 MDT 2007'
__revision__ = '$Id: factory.py,v 1.11 2007/09/11 21:38:43 zwoop Exp $'
__version__ = '$Revision: 1.11 $'

Author
`` |  | Leif Hedstrom <leif@ogre.com>