pyTweetBot.news package

Submodules

pyTweetBot.news.GoogleNewsClient module

class pyTweetBot.news.GoogleNewsClient.GoogleNewsClient(keyword, lang, country)

Bases: object

This a a Google News client. Which returns an array containing the URLs and titles.

get_news(page=0)

Get news :param page: Page to get :return: Array of news

get_page_title(url)

Get page’s title :param url: :return:

pyTweetBot.news.NewsParser module

class pyTweetBot.news.NewsParser.NewsParser

Bases: HTMLParser.HTMLParser

This is a class parsing HTML from Google news. It returns an array containing the URLs.

get_news()

Get the news :return:

handle_starttag(tag, attrs)

Handle startag :param tag: Tag to handle :param attrs: Tag’s attributes

Module contents