~facundo/encuentro/trunk

« back to all changes in this revision

Viewing changes to server/scrapers_conect.py

  • Committer: Facundo Batista
  • Date: 2017-06-23 00:35:18 UTC
  • mto: This revision was merged to the branch mainline in revision 296.
  • Revision ID: facundo@taniquetil.com.ar-20170623003518-sv60l0eib3rjx882
Huge renewal refactor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
 
3
 
# Copyright 2012-2014 Facundo Batista
 
1
# Copyright 2012-2017 Facundo Batista
4
2
#
5
3
# This program is free software: you can redistribute it and/or modify it
6
4
# under the terms of the GNU General Public License version 3, as published
26
24
 
27
25
def scrap_series(html):
28
26
    """Get useful info from the series list."""
29
 
    soup = bs4.BeautifulSoup(helpers.sanitize(html))
 
27
    soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser")
30
28
 
31
29
    episodes_list = soup.find('ul', id='listaEpisodios')
32
30
    results = []
57
55
 
58
56
def scrap_video(html):
59
57
    """Get useful info from the video page."""
60
 
    soup = bs4.BeautifulSoup(helpers.sanitize(html))
 
58
    soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser")
61
59
 
62
60
    item = soup.find('p', class_='duracion')
63
61
    if item is not None: