# Path: recommender/reading_time_estimator.py
# CHARACTERS_PER_MINUTE = 860
# def Estimate(tree):
# def _IsVisible(element):
# def _CountCharacters(texts):
# def EstimateUrl(url):


import cgi
import logging
import feedparser
import lxml.etree
import lxml.html
import lxml.html.soupparser
import urlparse
from recommender import reading_time_estimator
from google.appengine.api import urlfetch
      FindContent(tree, [{
          'path': './/head/link[@rel="canonical"]',
          'attribute': 'href'
      }, {
          'path': './/head/meta[@property="og:url"]',
          'attribute': 'content'
      }]))

  if not result.canonical_url:
    result.canonical_url = final_url

  result.description = FindContent(tree, [{
      'path': './/head/meta[@property="og:description"]',
      'attribute': 'content'
  }, {
      'path': './/head/meta[@name="description"]',
      'attribute': 'content'
  }, {
      'path': './/head/meta[@name="twitter:description"]',
      'attribute': 'content'
  }])
  result.feed_url = None
  result.feed_title = None
  if not FindFeedUrl(url, tree, './/head/link[@type="application/rss+xml"]',
                     result):
    FindFeedUrl(url, tree, './/head/link[@type="application/atom+xml"]', result)

  result.is_feed = False

  try:

# Path: recommender/reading_time_estimator.py
# CHARACTERS_PER_MINUTE = 860
# def Estimate(tree):
# def _IsVisible(element):
# def _CountCharacters(texts):
# def EstimateUrl(url):


# Path: recommender/url_util.py
import cgi
import logging
import feedparser
import lxml.etree
import lxml.html
import lxml.html.soupparser
import urlparse
from recommender import reading_time_estimator
from google.appengine.api import urlfetch

      FindContent(tree, [{
          'path': './/head/link[@rel="canonical"]',
          'attribute': 'href'
      }, {
          'path': './/head/meta[@property="og:url"]',
          'attribute': 'content'
      }]))

  if not result.canonical_url:
    result.canonical_url = final_url

  result.description = FindContent(tree, [{
      'path': './/head/meta[@property="og:description"]',
      'attribute': 'content'
  }, {
      'path': './/head/meta[@name="description"]',
      'attribute': 'content'
  }, {
      'path': './/head/meta[@name="twitter:description"]',
      'attribute': 'content'
  }])
  result.feed_url = None
  result.feed_title = None
  if not FindFeedUrl(url, tree, './/head/link[@type="application/rss+xml"]',
                     result):
    FindFeedUrl(url, tree, './/head/link[@type="application/atom+xml"]', result)

  result.is_feed = False

  try:

    result.estimated_reading_time = reading_time_estimator.Estimate(tree)