Beispiel #1
0
def video_config(url):
  # get the config file url
  config_url = video_config_url(url)
  
  if not config_url:
    return None
  
  # load and cache the config file
  json_config = loader.load_page(config_url)

  # turn the json string into a json dict
  return json.loads(json_config)
Beispiel #2
0
def _get_soup(url, cache=False):
  html = loader.load_page(url)
  return BeautifulSoup(html, 'html.parser')