~facundo/encuentro/trunk

« back to all changes in this revision

Viewing changes to server/get_bacua_episodes.py

  • Committer: Facundo Batista
  • Date: 2013-05-15 22:04:00 UTC
  • Revision ID: facundo@taniquetil.com.ar-20130515220400-fchnxlk4trpmef8h
Better BACUA scrapping.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
            continue
78
78
 
79
79
        title = i.h4.contents[0].title().strip()
80
 
        sinopsis = i.find("h5", {"class": "sinopsis_cat"}).contents[0]
 
80
        _sinop_cat = i.find("h5", {"class": "sinopsis_cat"}).contents
 
81
        sinopsis = _sinop_cat[0] if _sinop_cat else u""
81
82
        id_video = i.findAll("li")[1].a['href'].split("=")[1]
82
83
        image_url = IMG_URL % (id_video,)
83
84
        video_url = BACKEND % (id_video,)