module helper.search_engine

Short summary

module pyrsslocal.helper.search_engine

various function to get the content of a page, of a search page…

source on GitHub

Functions

function

truncated documentation

extract_bing_result

extract the first results from a search page assuming it coms from Bing

query_bing

Returns the search page from Bing for a specific query.

Documentation

various function to get the content of a page, of a search page…

source on GitHub

pyrsslocal.helper.search_engine.extract_bing_result(searchPage, filter_=<function <lambda>>)

extract the first results from a search page assuming it coms from Bing

Parameters:
  • searchPage

    content of Bing search page

  • filter – remove some urls if this function is False filter_(u) –> True or False

Returns:

a list with the urls

source on GitHub

pyrsslocal.helper.search_engine.query_bing(query, folderCache='cacheSearchPage', filter_=<function <lambda>>, fLOG=<function noLOG>)

Returns the search page from Bing for a specific query.

Parameters:
  • query – search query

  • folderCache – folder used to stored the result page or to retrieve a page if the query was already searched for

  • filter – remove some urls if this function is False filter(u) –> True or False

  • fLOG – logging function

Returns:

list of urls

source on GitHub