Merge lp:~facundo/encuentro/huge-renewal-refactor into lp:encuentro
- huge-renewal-refactor
- Merge into trunk
Proposed by
Facundo Batista
Status: | Merged |
---|---|
Merged at revision: | 296 |
Proposed branch: | lp:~facundo/encuentro/huge-renewal-refactor |
Merge into: | lp:encuentro |
Diff against target: |
8837 lines (+6908/-1176) 37 files modified
.bzrignore (+1/-0) bin/encuentro (+10/-3) encuentro/main.py (+6/-6) encuentro/network.py (+6/-6) encuentro/ui/main.py (+5/-4) encuentro/update.py (+38/-39) requirements_py3.txt (+4/-2) run (+2/-0) server/backends-v07.list (+7/-0) server/get_bacua_episodes.py (+9/-10) server/get_cda_episodes.py (+0/-179) server/get_conect_episodes.py (+9/-11) server/get_dqsv_episodes.py (+7/-4) server/get_encuen_episodes.py (+118/-110) server/helpers.py (+32/-19) server/scrapers_cda.py (+0/-60) server/scrapers_conect.py (+3/-5) server/scrapers_dqsv.py (+3/-2) server/scrapers_encuen.py (+114/-29) server/srv_logger.py (+1/-1) test (+4/-4) tests/ej-cda-main-1.json (+0/-1) tests/ej-encuen-bestvideo-1.html (+119/-0) tests/ej-encuen-bestvideo-2.html (+972/-0) tests/ej-encuen-list-1.html (+846/-0) tests/ej-encuen-program-1.html (+581/-0) tests/ej-encuen-program-2.html (+899/-0) tests/ej-encuen-program-3.html (+1442/-0) tests/ej-encuen-programa_1.html (+0/-323) tests/ej-encuen-programa_2.html (+0/-250) tests/ej-encuen-series-1.html (+1442/-0) tests/test_bacua_scrapers.py (+7/-9) tests/test_cda_scrapers.py (+0/-50) tests/test_conect_scrapers.py (+4/-4) tests/test_dqsv_scrapers.py (+34/-3) tests/test_encuen_scrapers.py (+150/-37) tests/test_helpers.py (+33/-5) |
To merge this branch: | bzr merge lp:~facundo/encuentro/huge-renewal-refactor |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Facundo Batista | Pending | ||
Review via email:
|
Commit message
Description of the change
A LOT of changes:
- changed all scrapers to be Py3
- improved / created helper scripts
- made GUI to optionally load sources from a local path
- deleted everything regarding CDA
- renewed Encuentro scraper...
- ...even parsing JS to get the best quality video
Explicitly left for the future: remove everything related to "authentication" (as it is not needed anymore for any download type).
To post a comment you must log in.
- 296. By Facundo Batista
-
Massive renewal to bring the project back to life.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2014-10-29 13:59:33 +0000 |
3 | +++ .bzrignore 2017-07-08 22:31:52 +0000 |
4 | @@ -1,3 +1,4 @@ |
5 | server/logs |
6 | tests/__pycache__ |
7 | server/__pycache__ |
8 | +encuentro/__pycache__ |
9 | |
10 | === modified file 'bin/encuentro' |
11 | --- bin/encuentro 2014-04-29 01:25:52 +0000 |
12 | +++ bin/encuentro 2017-07-08 22:31:52 +0000 |
13 | @@ -1,6 +1,6 @@ |
14 | #!/usr/bin/env python |
15 | |
16 | -# Copyright 2011-2014 Facundo Batista |
17 | +# Copyright 2011-2017 Facundo Batista |
18 | # |
19 | # This program is free software: you can redistribute it and/or modify it |
20 | # under the terms of the GNU General Public License version 3, as published |
21 | @@ -18,6 +18,7 @@ |
22 | |
23 | """Script to run Encuentro.""" |
24 | |
25 | +import argparse |
26 | import logging |
27 | import sys |
28 | import os |
29 | @@ -39,8 +40,14 @@ |
30 | |
31 | from encuentro import main, multiplatform, logger |
32 | |
33 | +# parse cmd line params |
34 | +parser = argparse.ArgumentParser() |
35 | +parser.add_argument('--verbose', '-v', action='store_true', help="Set the log in verbose.") |
36 | +parser.add_argument('--source', '-s', help="Define the local source for metadata update files.") |
37 | +args = parser.parse_args() |
38 | + |
39 | # set up logging |
40 | -verbose = len(sys.argv) > 1 and sys.argv[1] == '-v' |
41 | +verbose = bool(args.verbose) |
42 | logger.set_up(verbose) |
43 | log = logging.getLogger('encuentro.init') |
44 | |
45 | @@ -56,4 +63,4 @@ |
46 | print "Encuentro: sin revno info" |
47 | log.info("Encuentro version: %r", version) |
48 | |
49 | -main.start(version) |
50 | +main.start(version, args.source) |
51 | |
52 | === modified file 'encuentro/main.py' |
53 | --- encuentro/main.py 2015-07-24 19:47:56 +0000 |
54 | +++ encuentro/main.py 2017-07-08 22:31:52 +0000 |
55 | @@ -1,4 +1,4 @@ |
56 | -# Copyright 2013-2014 Facundo Batista |
57 | +# Copyright 2013-2017 Facundo Batista |
58 | # |
59 | # This program is free software: you can redistribute it and/or modify it |
60 | # under the terms of the GNU General Public License version 3, as published |
61 | @@ -30,12 +30,12 @@ |
62 | # will try to load EpisodeData from this namespace |
63 | from encuentro.data import EpisodeData # NOQA |
64 | |
65 | +from PyQt4.QtGui import QApplication, QIcon |
66 | + |
67 | logger = logging.getLogger('encuentro.init') |
68 | |
69 | -from PyQt4.QtGui import QApplication, QIcon |
70 | - |
71 | - |
72 | -def start(version): |
73 | + |
74 | +def start(version, update_source): |
75 | """Rock and roll.""" |
76 | # set up config |
77 | fname = os.path.join(multiplatform.config_dir, 'encuentro.conf') |
78 | @@ -48,5 +48,5 @@ |
79 | icon = QIcon(multiplatform.get_path("encuentro/logos/icon-192.png")) |
80 | app.setWindowIcon(icon) |
81 | |
82 | - MainUI(version, app.quit) |
83 | + MainUI(version, app.quit, update_source) |
84 | sys.exit(app.exec_()) |
85 | |
86 | === modified file 'encuentro/network.py' |
87 | --- encuentro/network.py 2016-01-04 20:00:44 +0000 |
88 | +++ encuentro/network.py 2017-07-08 22:31:52 +0000 |
89 | @@ -1,6 +1,6 @@ |
90 | # -*- coding: utf8 -*- |
91 | |
92 | -# Copyright 2011-2016 Facundo Batista |
93 | +# Copyright 2011-2017 Facundo Batista |
94 | # |
95 | # This program is free software: you can redistribute it and/or modify it |
96 | # under the terms of the GNU General Public License version 3, as published |
97 | @@ -16,10 +16,10 @@ |
98 | # |
99 | # For further info, check https://launchpad.net/encuentro |
100 | |
101 | +"""Some functions to deal with network and Encuentro site.""" |
102 | + |
103 | from __future__ import unicode_literals, print_function |
104 | |
105 | -"""Some functions to deal with network and Encuentro site.""" |
106 | - |
107 | import json |
108 | import logging |
109 | import os |
110 | @@ -43,10 +43,10 @@ |
111 | for n in "QDate QDateTime QString QTextStream QTime QUrl QVariant".split(): |
112 | sip.setapi(n, 2) # API v2 FTW! |
113 | |
114 | -from PyQt4 import QtNetwork, QtCore |
115 | +from PyQt4 import QtNetwork, QtCore # NOQA (import not at the top) |
116 | |
117 | -from encuentro import multiplatform, utils |
118 | -from encuentro.config import config |
119 | +from encuentro import multiplatform, utils # NOQA (import not at the top) |
120 | +from encuentro.config import config # NOQA (import not at the top) |
121 | |
122 | # special import sequence to get a useful version of youtube-dl |
123 | try: |
124 | |
125 | === modified file 'encuentro/ui/main.py' |
126 | --- encuentro/ui/main.py 2016-01-04 20:00:44 +0000 |
127 | +++ encuentro/ui/main.py 2017-07-08 22:31:52 +0000 |
128 | @@ -89,11 +89,12 @@ |
129 | |
130 | _programs_file = os.path.join(multiplatform.data_dir, 'encuentro.data') |
131 | |
132 | - def __init__(self, version, app_quit): |
133 | + def __init__(self, version, app_quit, update_source): |
134 | super(MainUI, self).__init__() |
135 | self.app_quit = app_quit |
136 | self.finished = False |
137 | self.version = version |
138 | + self.update_source = update_source |
139 | self.downloaders = {} |
140 | self.setWindowTitle('Encuentro') |
141 | |
142 | @@ -115,7 +116,7 @@ |
143 | systray.show(self) |
144 | |
145 | if config.get('autorefresh'): |
146 | - ue = update.UpdateEpisodes(self) |
147 | + ue = update.UpdateEpisodes(self, update_source) |
148 | ue.background() |
149 | else: |
150 | # refresh data if never done before or if last |
151 | @@ -123,7 +124,7 @@ |
152 | last_refresh = config.get('autorefresh_last_time') |
153 | if last_refresh is None or ( |
154 | dt.datetime.now() - last_refresh > dt.timedelta(7)): |
155 | - ue = update.UpdateEpisodes(self) |
156 | + ue = update.UpdateEpisodes(self, update_source) |
157 | ue.background() |
158 | |
159 | self.show() |
160 | @@ -349,7 +350,7 @@ |
161 | |
162 | def refresh_episodes(self, _=None): |
163 | """Update and refresh episodes.""" |
164 | - ue = update.UpdateEpisodes(self) |
165 | + ue = update.UpdateEpisodes(self, self.update_source) |
166 | ue.interactive() |
167 | |
168 | def download_episode(self, _=None): |
169 | |
170 | === modified file 'encuentro/update.py' |
171 | --- encuentro/update.py 2015-12-30 12:50:05 +0000 |
172 | +++ encuentro/update.py 2017-07-08 22:31:52 +0000 |
173 | @@ -1,6 +1,6 @@ |
174 | # -*- coding: utf8 -*- |
175 | |
176 | -# Copyright 2011-2015 Facundo Batista |
177 | +# Copyright 2011-2017 Facundo Batista |
178 | # |
179 | # This program is free software: you can redistribute it and/or modify it |
180 | # under the terms of the GNU General Public License version 3, as published |
181 | @@ -23,21 +23,21 @@ |
182 | import bz2 |
183 | import json |
184 | import logging |
185 | +import os |
186 | + |
187 | from datetime import datetime |
188 | -from encuentro.config import config |
189 | |
190 | import defer |
191 | |
192 | +from PyQt4.QtGui import QApplication |
193 | + |
194 | from encuentro import utils |
195 | +from encuentro.config import config |
196 | from encuentro.ui import dialogs |
197 | |
198 | # main entry point to download all backends data |
199 | -BACKENDS_URL = "http://www.taniquetil.com.ar/encuentro/backends-v06.list" |
200 | - |
201 | -# if developing a new backend, put the tuple here; otherwise leave it in None. |
202 | -# the tuple is name, downloader, and path |
203 | -BACKEND_TEST_DATA = None |
204 | -# ("cda", "chunks", "/home/facundo/devel/reps/encuentro/cda/server/cda-v05.bz2") |
205 | +BACKENDS_BASE_URL = "http://www.taniquetil.com.ar/encuentro/" |
206 | +BACKENDS_LIST = "backends-v07.list" |
207 | |
208 | logger = logging.getLogger('encuentro.update') |
209 | |
210 | @@ -45,8 +45,9 @@ |
211 | class UpdateEpisodes(object): |
212 | """Update the episodes info.""" |
213 | |
214 | - def __init__(self, main_window): |
215 | + def __init__(self, main_window, update_source): |
216 | self.main_window = main_window |
217 | + self.update_source = update_source |
218 | |
219 | def background(self): |
220 | """Trigger an update in background.""" |
221 | @@ -59,13 +60,30 @@ |
222 | self._update(dialog) |
223 | |
224 | @defer.inline_callbacks |
225 | + def _get(self, filename): |
226 | + """Get the content from the server or a local source.""" |
227 | + if self.update_source is None: |
228 | + # from the server |
229 | + url = BACKENDS_BASE_URL + filename |
230 | + logger.debug("Getting content from url %r", url) |
231 | + _, content = yield utils.download(url) |
232 | + else: |
233 | + # from a local source |
234 | + filepath = os.path.join(self.update_source, filename) |
235 | + logger.debug("Getting content from filepath %r", filepath) |
236 | + with open(filepath, 'rb') as fh: |
237 | + content = fh.read() |
238 | + |
239 | + defer.return_value(content) |
240 | + |
241 | + @defer.inline_callbacks |
242 | def _update(self, dialog=None): |
243 | - """Update the content from server. |
244 | + """Update the content from source, being it server or something indicated at start.""" |
245 | + if dialog: |
246 | + # when loading from disk we won't free the CPU much, so let's |
247 | + # leave some time for Qt to work (here on start and on each message below) |
248 | + QApplication.processEvents() |
249 | |
250 | - If we have a dialog (interactive update), check frequently if |
251 | - it was closed, so we stop working for that request. |
252 | - """ |
253 | - if dialog: |
254 | def tell_user(template, *elements): |
255 | if elements: |
256 | try: |
257 | @@ -76,13 +94,15 @@ |
258 | else: |
259 | msg = template |
260 | dialog.append(msg) |
261 | + QApplication.processEvents() |
262 | else: |
263 | - tell_user = lambda *t: None |
264 | + def tell_user(*t): |
265 | + """Do nothing.""" |
266 | |
267 | logger.info("Downloading backend list") |
268 | tell_user("Descargando la lista de backends...") |
269 | try: |
270 | - _, backends_file = yield utils.download(BACKENDS_URL) |
271 | + backends_file = yield self._get(BACKENDS_LIST) |
272 | except Exception as e: |
273 | logger.error("Problem when downloading backends: %s", e) |
274 | tell_user("Hubo un PROBLEMA al bajar la lista de backends: %s", e) |
275 | @@ -93,11 +113,11 @@ |
276 | if l and l[0] != '#'] |
277 | |
278 | backends = {} |
279 | - for b_name, b_dloader, b_url in backends_list: |
280 | + for b_name, b_dloader, b_filename in backends_list: |
281 | logger.info("Downloading backend metadata for %r", b_name) |
282 | tell_user("Descargando la lista de episodios para backend %r...", b_name) |
283 | try: |
284 | - _, compressed = yield utils.download(b_url) |
285 | + compressed = yield self._get(b_filename) |
286 | except Exception as e: |
287 | logger.error("Problem when downloading episodes: %s", e) |
288 | tell_user("Hubo un PROBLEMA al bajar los episodios: %s", e) |
289 | @@ -114,27 +134,6 @@ |
290 | item['downtype'] = b_dloader |
291 | backends[b_name] = content |
292 | |
293 | - if BACKEND_TEST_DATA is not None: |
294 | - b_name, b_dloader, b_path = BACKEND_TEST_DATA |
295 | - logger.info("Grabbing test backend metadata for %r", b_name) |
296 | - tell_user("Usando la lista de episodios para backend de prueba %r...", b_name) |
297 | - try: |
298 | - with open(b_path, "rb") as fh: |
299 | - compressed = fh.read() |
300 | - except Exception as e: |
301 | - logger.error("Problem when reading test file: %s", e) |
302 | - tell_user("Hubo un PROBLEMA al leer el archivo de prueba: %s", e) |
303 | - return |
304 | - |
305 | - tell_user("Descomprimiendo el archivo....") |
306 | - new_content = bz2.decompress(compressed) |
307 | - logger.debug("Grabbed data decompressed ok") |
308 | - |
309 | - content = json.loads(new_content) |
310 | - for item in content: |
311 | - item['downtype'] = b_dloader |
312 | - backends[b_name] = content |
313 | - |
314 | if dialog and dialog.closed: |
315 | return |
316 | tell_user("Conciliando datos de diferentes backends") |
317 | |
318 | === modified file 'requirements_py3.txt' |
319 | --- requirements_py3.txt 2015-12-29 11:51:06 +0000 |
320 | +++ requirements_py3.txt 2017-07-08 22:31:52 +0000 |
321 | @@ -1,4 +1,6 @@ |
322 | nose>=1.3.1 |
323 | yaswfp>=0.4 |
324 | -beautifulsoup4 |
325 | -m3u8 |
326 | +beautifulsoup4==4.6.0 |
327 | +m3u8==0.3.2 |
328 | +slimit==0.8.1 |
329 | +ply==3.4 |
330 | |
331 | === added file 'run' |
332 | --- run 1970-01-01 00:00:00 +0000 |
333 | +++ run 2017-07-08 22:31:52 +0000 |
334 | @@ -0,0 +1,2 @@ |
335 | +fades --python=python2 --system-site-packages -r requirements_py2.txt bin/encuentro --verbose |
336 | + |
337 | |
338 | === added file 'server/backends-v07.list' |
339 | --- server/backends-v07.list 1970-01-01 00:00:00 +0000 |
340 | +++ server/backends-v07.list 2017-07-08 22:31:52 +0000 |
341 | @@ -0,0 +1,7 @@ |
342 | +# list of files to download, with data for different backends each line has |
343 | +# the backend name, the downloader to use, and the metadata file name |
344 | +encuentro generic encuentro-v06.bz2 |
345 | +conectar conectar conectar-v06.bz2 |
346 | +bacua generic bacua-v05.bz2 |
347 | +dqsv dqsv dqsv-v05.bz2 |
348 | +ted1 youtube ted1-v05.bz2 |
349 | |
350 | === modified file 'server/get_bacua_episodes.py' |
351 | --- server/get_bacua_episodes.py 2014-11-20 21:04:51 +0000 |
352 | +++ server/get_bacua_episodes.py 2017-07-08 22:31:52 +0000 |
353 | @@ -1,6 +1,4 @@ |
354 | -# -*- coding: utf8 -*- |
355 | - |
356 | -# Copyright 2012-2014 Facundo Batista |
357 | +# Copyright 2012-2017 Facundo Batista |
358 | # |
359 | # This program is free software: you can redistribute it and/or modify it |
360 | # under the terms of the GNU General Public License version 3, as published |
361 | @@ -21,7 +19,8 @@ |
362 | import logging |
363 | import re |
364 | import sys |
365 | -import urllib2 |
366 | + |
367 | +from urllib import request |
368 | |
369 | from bs4 import BeautifulSoup |
370 | |
371 | @@ -43,10 +42,10 @@ |
372 | |
373 | def scrap_list_page(html): |
374 | """Scrap the list page.""" |
375 | - pagina = re.compile('<p class="info_resultado_busca">([^"]*)</p>') |
376 | + pagina = re.compile(b'<p class="info_resultado_busca">([^"]*)</p>') |
377 | m = pagina.search(html).group(1) |
378 | - s = re.sub('<[^<]+?>', '', m) |
379 | - t = re.compile('[0-9]+[0-9]') |
380 | + s = re.sub(b'<[^<]+?>', b'', m) |
381 | + t = re.compile(b'[0-9]+[0-9]') |
382 | h = t.search(s).group(0) |
383 | s = int(h) + 1 |
384 | lista = [] |
385 | @@ -59,7 +58,7 @@ |
386 | def get_list_pages(): |
387 | """Get list of pages.""" |
388 | logger.info("Getting list of pages") |
389 | - response = urllib2.urlopen(PAGE_URL) |
390 | + response = request.urlopen(PAGE_URL) |
391 | html = response.read() |
392 | lista = scrap_list_page(html) |
393 | logger.info(" got %d", len(lista)) |
394 | @@ -70,7 +69,7 @@ |
395 | """Scrap the page.""" |
396 | contents = [] |
397 | sanitized = helpers.sanitize(html) |
398 | - soup = BeautifulSoup(sanitized) |
399 | + soup = BeautifulSoup(sanitized, "html.parser") |
400 | for i in soup.findAll("div", {"class": "video_muestra_catalogo"}): |
401 | for a_node in i.find_all("a"): |
402 | onclick = a_node.get("onclick", "") |
403 | @@ -99,7 +98,7 @@ |
404 | def get_content(page_url): |
405 | """Get content from a page.""" |
406 | logger.info("Getting info for page %r", page_url) |
407 | - u = urllib2.urlopen(page_url) |
408 | + u = request.urlopen(page_url) |
409 | html = u.read() |
410 | contents = scrap_page(html) |
411 | logger.info(" got %d contents", len(contents)) |
412 | |
413 | === removed file 'server/get_cda_episodes.py' |
414 | --- server/get_cda_episodes.py 2015-12-31 20:41:12 +0000 |
415 | +++ server/get_cda_episodes.py 1970-01-01 00:00:00 +0000 |
416 | @@ -1,179 +0,0 @@ |
417 | -# Copyright 2015 Facundo Batista |
418 | -# |
419 | -# This program is free software: you can redistribute it and/or modify it |
420 | -# under the terms of the GNU General Public License version 3, as published |
421 | -# by the Free Software Foundation. |
422 | -# |
423 | -# This program is distributed in the hope that it will be useful, but |
424 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
425 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
426 | -# PURPOSE. See the GNU General Public License for more details. |
427 | -# |
428 | -# You should have received a copy of the GNU General Public License along |
429 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
430 | -# |
431 | -# For further info, check https://launchpad.net/encuentro |
432 | - |
433 | -from __future__ import unicode_literals |
434 | - |
435 | -"""Main server process to get all info from CDA web site.""" |
436 | - |
437 | -import json |
438 | -import logging |
439 | -import sys |
440 | -import m3u8 |
441 | - |
442 | -from urllib import request, error |
443 | - |
444 | -import helpers |
445 | -import srv_logger |
446 | -import scrapers_cda |
447 | - |
448 | -SECTIONS = [ |
449 | - (6, "Series"), |
450 | - (8, "Documentales"), |
451 | - (17, "Micros"), |
452 | - (26, "Igualdad Cultural"), |
453 | - (20, "Acua Federal"), |
454 | - (21, "Acua Mayor"), |
455 | - (24, "Enamorar"), |
456 | -] |
457 | - |
458 | -CLIP_URL = "http://cda.gob.ar/clip/ajax/{episode_id}" |
459 | -SECTION_URL = "http://cda.gob.ar/serie/list/ajax/?category_id={section}&page={page}&view=list" |
460 | -_STREAM_URL = 'http://186.33.226.132/vod/smil:content/videos/clips/' |
461 | -PLAYLIST_URL = _STREAM_URL + '{video_id}.smil/playlist.m3u8' |
462 | -CHUNKS_URL = _STREAM_URL + '{video_id}.smil/{id}' |
463 | - |
464 | - |
465 | -cache = helpers.Cache("episodes_cache_cda.pickle") |
466 | -logger = logging.getLogger('CDA') |
467 | - |
468 | - |
469 | -@helpers.retryable(logger) |
470 | -def hit(url, apply_cache): |
471 | - """Get the info from an episode.""" |
472 | - if apply_cache: |
473 | - logger.info("Hitting: %r", url) |
474 | - try: |
475 | - raw = cache.get(url) |
476 | - logger.info(" cached!") |
477 | - except KeyError: |
478 | - u = request.urlopen(url) |
479 | - raw = u.read() |
480 | - cache.set(url, raw) |
481 | - logger.info(" ok (len=%d)", len(raw)) |
482 | - else: |
483 | - logger.info("Hitting uncached: %r", url) |
484 | - u = request.urlopen(url) |
485 | - raw = u.read() |
486 | - logger.info(" ok (len=%d)", len(raw)) |
487 | - return raw |
488 | - |
489 | - |
490 | -def _get_video_info(episode_id): |
491 | - """Really get the info.""" |
492 | - logger.info("Getting video info for episode %s", episode_id) |
493 | - url = CLIP_URL.format(episode_id=episode_id) |
494 | - raw = hit(url, apply_cache=False) |
495 | - data = json.loads(raw.decode("utf8")) |
496 | - video_id = data['video_id'] |
497 | - |
498 | - logger.info("Getting playlist info for video %s", video_id) |
499 | - url = PLAYLIST_URL.format(video_id=video_id) |
500 | - try: |
501 | - raw = hit(url, apply_cache=False) |
502 | - except error.HTTPError as err: |
503 | - if err.code == 404: |
504 | - logger.info(" nonexistant!!") |
505 | - return |
506 | - raise |
507 | - chunklist_id = raw.splitlines()[-1].strip() # highest quality |
508 | - |
509 | - logger.info("Getting chunks info from chunk list %s", chunklist_id) |
510 | - url = CHUNKS_URL.format(video_id=video_id, id=chunklist_id.decode('utf8')) |
511 | - try: |
512 | - raw = hit(url, apply_cache=False) |
513 | - except error.HTTPError as err: |
514 | - if err.code == 404: |
515 | - logger.info(" nonexistant!!") |
516 | - return |
517 | - raise |
518 | - m3u8_obj = m3u8.loads(raw.decode("utf8")) |
519 | - duration = int(sum([seg.duration for seg in m3u8_obj.segments]) / 60) |
520 | - url_parts = [CHUNKS_URL.format(video_id=video_id, id=seg.uri) for seg in m3u8_obj.segments] |
521 | - return video_id, duration, json.dumps(url_parts) |
522 | - |
523 | - |
524 | -def get_video_info(episode_id): |
525 | - """Get info from an episode video.""" |
526 | - try: |
527 | - info = cache.get(episode_id) |
528 | - logger.info("Cached video info for episode %s", episode_id) |
529 | - except KeyError: |
530 | - info = _get_video_info(episode_id) |
531 | - cache.set(episode_id, info) |
532 | - return info |
533 | - |
534 | - |
535 | -def get_per_section(section_name, section_id): |
536 | - """Get pages for a section.""" |
537 | - page = 0 |
538 | - while True: |
539 | - page += 1 |
540 | - logger.info("Getting info for section %r (%d), page %d", section_name, section_id, page) |
541 | - url = SECTION_URL.format(page=page, section=section_id) |
542 | - raw = hit(url, apply_cache=False) |
543 | - something_generated = False |
544 | - for info in scrapers_cda.scrap_section(raw): |
545 | - something_generated = True |
546 | - yield info |
547 | - if not something_generated: |
548 | - break |
549 | - |
550 | - |
551 | -def get_all_data(): |
552 | - """Get everything.""" |
553 | - logger.info("Go") |
554 | - all_programs = [] |
555 | - already_stored = set() |
556 | - for section_id, section_name in SECTIONS: |
557 | - for show_title, image, info_text, episodes in get_per_section(section_name, section_id): |
558 | - key = tuple(epid for _, epid in episodes) |
559 | - if key in already_stored: |
560 | - logger.info("Ignoring program %r with episodes %s", show_title, key) |
561 | - continue |
562 | - already_stored.add(key) |
563 | - for episode_name, episode_id in episodes: |
564 | - video_info = get_video_info(episode_id) |
565 | - if video_info is None: |
566 | - continue |
567 | - video_id, duration, video_url_info = video_info |
568 | - info = { |
569 | - "duration": str(duration), |
570 | - "channel": "CDA", |
571 | - "section": section_name, |
572 | - "description": info_text, |
573 | - "title": episode_name, |
574 | - "subtitle": None, |
575 | - "url": video_url_info, |
576 | - "episode_id": 'cda_{}_{}'.format(episode_id, video_id), |
577 | - "image_url": image, |
578 | - "season": show_title, |
579 | - } |
580 | - all_programs.append(info) |
581 | - |
582 | - logger.info("Done! Total programs: %d", len(all_programs)) |
583 | - return all_programs |
584 | - |
585 | - |
586 | -def main(): |
587 | - """Entry Point.""" |
588 | - all_data = get_all_data() |
589 | - helpers.save_file("cda-v05", all_data) |
590 | - |
591 | - |
592 | -if __name__ == '__main__': |
593 | - shy = len(sys.argv) > 1 and sys.argv[1] == '--shy' |
594 | - srv_logger.setup_log(shy) |
595 | - main() |
596 | |
597 | === modified file 'server/get_conect_episodes.py' |
598 | --- server/get_conect_episodes.py 2015-04-23 21:10:51 +0000 |
599 | +++ server/get_conect_episodes.py 2017-07-08 22:31:52 +0000 |
600 | @@ -1,6 +1,4 @@ |
601 | -# -*- coding: utf8 -*- |
602 | - |
603 | -# Copyright 2013-2014 Facundo Batista |
604 | +# Copyright 2013-2017 Facundo Batista |
605 | # |
606 | # This program is free software: you can redistribute it and/or modify it |
607 | # under the terms of the GNU General Public License version 3, as published |
608 | @@ -21,8 +19,8 @@ |
609 | import json |
610 | import logging |
611 | import sys |
612 | -import urllib |
613 | -import urllib2 |
614 | + |
615 | +from urllib import parse, request |
616 | |
617 | # we execute this script from inside the directory; pylint: disable=W0403 |
618 | import helpers |
619 | @@ -74,12 +72,12 @@ |
620 | """Search each page.""" |
621 | params = {'offset': offset, 'limit': 20, |
622 | 'tipo_emision_id': transm_id, 'ajax': True} |
623 | - data = "__params=" + urllib.quote(json.dumps(params)) |
624 | + data = b"__params=" + parse.quote(json.dumps(params)).encode('ascii') |
625 | url = URL_SEARCH % dict(channel_id=channel_id) |
626 | logger.debug("hitting url: %r (%r)", url, data) |
627 | - u = urllib2.urlopen(url, data=data) |
628 | + u = request.urlopen(url, data=data) |
629 | raw = u.read() |
630 | - data = json.loads(raw) |
631 | + data = json.loads(raw.decode('utf8')) |
632 | results = data['ResultSet']['data']['result'] |
633 | return results |
634 | |
635 | @@ -117,7 +115,7 @@ |
636 | def get_from_series(url): |
637 | """Get the episodes from an url page.""" |
638 | logger.info("Get from series: %r", url) |
639 | - u = urllib2.urlopen(url) |
640 | + u = request.urlopen(url) |
641 | page = u.read() |
642 | results = scrapers_conect.scrap_series(page) |
643 | logger.info(" %d", len(results)) |
644 | @@ -132,7 +130,7 @@ |
645 | info = episodes_cache.get(url) |
646 | logger.info(" cached!") |
647 | except KeyError: |
648 | - u = urllib2.urlopen(url) |
649 | + u = request.urlopen(url) |
650 | page = u.read() |
651 | info = scrapers_conect.scrap_video(page) |
652 | episodes_cache.set(url, info) |
653 | @@ -198,7 +196,7 @@ |
654 | def main(): |
655 | """Entry point.""" |
656 | all_data = get_all_data() |
657 | - helpers.save_file("conectar-v05", all_data) |
658 | + helpers.save_file("conectar-v06", all_data) |
659 | |
660 | |
661 | if __name__ == '__main__': |
662 | |
663 | === modified file 'server/get_dqsv_episodes.py' |
664 | --- server/get_dqsv_episodes.py 2015-12-12 22:28:51 +0000 |
665 | +++ server/get_dqsv_episodes.py 2017-07-08 22:31:52 +0000 |
666 | @@ -1,4 +1,4 @@ |
667 | -# Copyright 2014 Facundo Batista |
668 | +# Copyright 2014-2017 Facundo Batista |
669 | # |
670 | # This program is free software: you can redistribute it and/or modify it |
671 | # under the terms of the GNU General Public License version 3, as published |
672 | @@ -123,9 +123,12 @@ |
673 | |
674 | def get_swfs(): |
675 | """Retrieve all SWFs from site and parse them.""" |
676 | - soup = bs4.BeautifulSoup(hit(URL_FLASH, False)) |
677 | + soup = bs4.BeautifulSoup(hit(URL_FLASH, False), "html.parser") |
678 | links = [(x.text, x.text.split(".")) for x in soup.find_all('a')] |
679 | - names = [n for n, p in links if p[0].isdigit() and p[1] == 'swf'] |
680 | + orderable_names = [(int(p[0]), n) for n, p in links if p[0].isdigit() and p[1] == 'swf'] |
681 | + |
682 | + # order by the numeric value |
683 | + names = [x[1] for x in sorted(orderable_names)] |
684 | |
685 | # cache all except the last one, as it changes in the same month |
686 | names = [(n, True) for n in names[:-1]] + [(names[-1], False)] |
687 | @@ -141,7 +144,7 @@ |
688 | |
689 | def get_mp3s(): |
690 | """Retrieve all mp3s names.""" |
691 | - soup = bs4.BeautifulSoup(hit(URL_MUSIC, False)) |
692 | + soup = bs4.BeautifulSoup(hit(URL_MUSIC, False), "html.parser") |
693 | links = [x['href'] for x in soup.find_all('a')] |
694 | mp3s = [x for x in links if x[:6].isdigit() and x.endswith('.mp3')] |
695 | return mp3s |
696 | |
697 | === modified file 'server/get_encuen_episodes.py' |
698 | --- server/get_encuen_episodes.py 2015-12-21 18:03:34 +0000 |
699 | +++ server/get_encuen_episodes.py 2017-07-08 22:31:52 +0000 |
700 | @@ -1,6 +1,4 @@ |
701 | -# -*- coding: utf8 -*- |
702 | - |
703 | -# Copyright 2013-2014 Facundo Batista |
704 | +# Copyright 2013-2017 Facundo Batista |
705 | # |
706 | # This program is free software: you can redistribute it and/or modify it |
707 | # under the terms of the GNU General Public License version 3, as published |
708 | @@ -16,15 +14,14 @@ |
709 | # |
710 | # For further info, check https://launchpad.net/encuentro |
711 | |
712 | -from __future__ import print_function |
713 | - |
714 | """Main server process to get all info from Encuentro web site.""" |
715 | |
716 | import json |
717 | import logging |
718 | import sys |
719 | -import urllib |
720 | -import urllib2 |
721 | + |
722 | +from collections import namedtuple |
723 | +from urllib import request, error, parse |
724 | |
725 | # we execute this script from inside the directory; pylint: disable=W0403 |
726 | import helpers |
727 | @@ -32,153 +29,164 @@ |
728 | import srv_logger |
729 | |
730 | |
731 | -URL_LISTING = "http://www.encuentro.gov.ar/sitios/encuentro/Programas/getEmisionesDeSitio" |
732 | -URL_IMAGE_BASE = ( |
733 | - "http://repositorioimagen-download.educ.ar/repositorio/Imagen/ver?image_id=%(img_id)s" |
734 | -) |
735 | -URL_DETAILS = 'http://www.encuentro.gov.ar/sitios/encuentro/Programas/detalleCapitulo' |
736 | -URL_EPIS_BASE = "http://www.encuentro.gov.ar/sitios/encuentro/programas/ver?rec_id=%(epis_id)s" |
737 | - |
738 | -POST_DETAILS = '__params=%7B%22rec_id%22%3A{}%2C%22ajax%22%3Atrue%7D' |
739 | +URL_LISTING = "http://encuentro.gob.ar/programas?page={page}" |
740 | +URL_BASE = "http://encuentro.gob.ar/" |
741 | +URL_VIDEO = "http://videos.encuentro.gob.ar/video/?id={video_id}" |
742 | |
743 | logger = logging.getLogger("Encuentro") |
744 | |
745 | episodes_cache = helpers.Cache("episodes_cache_encuen.pickle") |
746 | |
747 | |
748 | -class EpisodeInfo(object): |
749 | - """Generic object to hold episode info.""" |
750 | - def __init__(self, **kwargs): |
751 | - self.__dict__.update(kwargs) |
752 | - |
753 | - |
754 | -@helpers.retryable(logger) |
755 | -def get_download_availability(episode_id): |
756 | - """Check if the episode is available for download.""" |
757 | - logger.info("Get availability: %s", episode_id) |
758 | - try: |
759 | - info = episodes_cache.get(episode_id) |
760 | - logger.info(" cached!") |
761 | - except KeyError: |
762 | - post = POST_DETAILS.format(episode_id) |
763 | - u = urllib2.urlopen(URL_DETAILS, data=post) |
764 | - t = u.read() |
765 | - data = json.loads(t) |
766 | - data = data["ResultSet"]['data']['recurso']['tipo_funcional']['data'] |
767 | - real_id = data['descargable']['file_id'] |
768 | - info = real_id is not None |
769 | - episodes_cache.set(episode_id, info) |
770 | - logger.info(" ok, avail? %s", real_id is not None) |
771 | - return info |
772 | - |
773 | - |
774 | -@helpers.retryable(logger) |
775 | -def get_episode_info(url): |
776 | +EpisodeInfo = namedtuple( |
777 | + 'EpisodeInfo', "section epis_url title description image_url duration epis_id season") |
778 | + |
779 | + |
780 | +@helpers.retryable(logger) |
781 | +def get_episode_info(program_number): |
782 | """Get the info from an episode.""" |
783 | + url = "http://encuentro.gob.ar/programas/json/" + program_number |
784 | logger.info("Get episode info: %r", url) |
785 | try: |
786 | info = episodes_cache.get(url) |
787 | logger.info(" cached!") |
788 | except KeyError: |
789 | - u = urllib2.urlopen(url) |
790 | - page = u.read() |
791 | - info = scrapers_encuen.scrap_programa(page) |
792 | + u = request.urlopen(url) |
793 | + raw = u.read() |
794 | + info = json.loads(raw.decode("utf8")) |
795 | episodes_cache.set(url, info) |
796 | logger.info(" ok") |
797 | return info |
798 | |
799 | |
800 | @helpers.retryable(logger) |
801 | -def get_listing_info(offset): |
802 | +def get_episodes_list(url): |
803 | + """Get the episodes list for a serie.""" |
804 | + logger.info("Get episodes list from %s", url) |
805 | + try: |
806 | + u = request.urlopen(url) |
807 | + raw = u.read() |
808 | + except error.HTTPError as err: |
809 | + logger.warning(" Ignoring! %r", err) |
810 | + return |
811 | + |
812 | + info = scrapers_encuen.scrap_series(raw) |
813 | + return info |
814 | + |
815 | + |
816 | +@helpers.retryable(logger) |
817 | +def get_listing_info(page): |
818 | """Get the info from a listing.""" |
819 | - logger.info("Get listing from offset %d", offset) |
820 | - params = {'offset': offset, 'limit': 20, 'ajax': True} |
821 | - data = "__params=" + urllib.quote(json.dumps(params)) |
822 | - logger.debug("hitting url: %r (%r)", URL_LISTING, data) |
823 | - u = urllib2.urlopen(URL_LISTING, data=data) |
824 | - raw = u.read() |
825 | - data = json.loads(raw) |
826 | - data = data['ResultSet']['data'] |
827 | - if data: |
828 | - results = data['result'] |
829 | - else: |
830 | - results = [] |
831 | - return results |
832 | + logger.info("Get listing from page %d", page) |
833 | + url = URL_LISTING.format(page=page) |
834 | + logger.debug("hitting url: %r", url) |
835 | + u = request.urlopen(url) |
836 | + raw = u.read() |
837 | + return scrapers_encuen.scrap_list(raw) |
838 | + |
839 | + |
840 | +@helpers.retryable(logger) |
841 | +def get_best_video(page): |
842 | + """Get the best video to download from the real web page.""" |
843 | + logger.info("Get best video from page %s", page) |
844 | + u = request.urlopen(page) |
845 | + raw = u.read() |
846 | + return scrapers_encuen.scrap_bestvideo(raw) |
847 | |
848 | |
849 | def get_episodes(): |
850 | """Yield episode info.""" |
851 | - offset = 0 |
852 | + page = 0 |
853 | all_items = [] |
854 | while True: |
855 | - logger.info("Get Episodes, listing") |
856 | - episodes = get_listing_info(offset) |
857 | + episodes = get_listing_info(page) |
858 | logger.info(" found %d", len(episodes)) |
859 | if not episodes: |
860 | break |
861 | |
862 | all_items.extend(episodes) |
863 | - offset += len(episodes) |
864 | + page += 1 |
865 | |
866 | # extract the relevant information |
867 | - for item in all_items: |
868 | - image = URL_IMAGE_BASE % dict(img_id=item['rec_medium_icon_image_id']) |
869 | - description = item['rec_descripcion'] |
870 | - epis_id = item['rec_id'] |
871 | - epis_url = URL_EPIS_BASE % dict(epis_id=epis_id) |
872 | - title = helpers.enhance_number(item['rec_titulo']) |
873 | - |
874 | - # get more info from the episode page |
875 | - logger.info("Getting info for %r %r", title, epis_url) |
876 | - duration, links_info = get_episode_info(epis_url) |
877 | - |
878 | - if len(links_info) == 0: |
879 | - if duration > 60: |
880 | - section = u"Película" |
881 | - elif duration < 10: |
882 | - section = u"Micro" |
883 | - else: |
884 | - section = u"Especial" |
885 | + for page_url, image, main_title in all_items: |
886 | + page_url = URL_BASE + parse.quote(page_url) |
887 | + image = URL_BASE + parse.quote(image) |
888 | + |
889 | + if '/serie/' in page_url: |
890 | + all_episodes = get_episodes_list(page_url) |
891 | + if all_episodes is None: |
892 | + logger.warning("Problem getting episodes list for %r (%s)", main_title, page_url) |
893 | + # problem getting the info |
894 | + continue |
895 | + else: |
896 | + program_number = page_url.split("/")[-1] |
897 | + all_episodes = [(None, program_number)] # no season! |
898 | + |
899 | + for season, program_number in all_episodes: |
900 | + episode_info = get_episode_info(program_number) |
901 | + api_epis_url = episode_info['download_url_hd'] |
902 | + if api_epis_url is None: |
903 | + # not downloadable program |
904 | + continue |
905 | + |
906 | + if season is None: |
907 | + # standalone program |
908 | + title = main_title |
909 | + else: |
910 | + # part of a Serie |
911 | + title = main_title + " / " + episode_info['title'].strip() |
912 | + |
913 | + duration = episode_info['duration'] |
914 | + if duration is not None: |
915 | + duration = int(duration) |
916 | + epis_id = str(episode_info['educar_id']) |
917 | + description = episode_info['description'].strip() |
918 | + |
919 | + # get the best possible video |
920 | + epis_url = get_best_video(URL_VIDEO.format(video_id=epis_id)) |
921 | + if epis_url is None: |
922 | + # fallback to the best option from the API |
923 | + epis_url = api_epis_url |
924 | + |
925 | + if season is None: |
926 | + if duration is None: |
927 | + section = u"Película" |
928 | + else: |
929 | + if duration > 60: |
930 | + section = u"Película" |
931 | + elif duration < 10: |
932 | + section = u"Micro" |
933 | + else: |
934 | + section = u"Especial" |
935 | + else: |
936 | + section = 'Series' |
937 | |
938 | ep = EpisodeInfo(section=section, epis_url=epis_url, |
939 | title=title, description=description, |
940 | image_url=image, duration=duration, |
941 | - epis_id=epis_id, season=None) |
942 | + epis_id=epis_id, season=season) |
943 | yield ep |
944 | - else: |
945 | - section = u"Serie" |
946 | - for season, title, url in links_info: |
947 | - epis_id = helpers.get_url_param(url, 'rec_id') |
948 | - ep = EpisodeInfo(section=section, epis_url=url, title=title, |
949 | - description=description, image_url=image, |
950 | - duration=duration, epis_id=epis_id, |
951 | - season=season) |
952 | - yield ep |
953 | |
954 | |
955 | def get_all_data(): |
956 | """Collect all data from the servers.""" |
957 | all_data = [] |
958 | - collected = {} |
959 | + collected = set() |
960 | for ep in get_episodes(): |
961 | - available = get_download_availability(ep.epis_id) |
962 | - if not available: |
963 | - continue |
964 | + # check if the unique id we use is reused (same episode used in two different places), and |
965 | + # in that case fake another id so the episode can still be stored and used |
966 | + if ep.epis_id in collected: |
967 | + episode_id = helpers.get_unique_id(ep.epis_id, collected) |
968 | + logger.info("Using a different id instead of %r: %r", ep.epis_id, episode_id) |
969 | + else: |
970 | + episode_id = ep.epis_id |
971 | + collected.add(episode_id) |
972 | + |
973 | + # store |
974 | info = dict(channel=u"Encuentro", title=ep.title, url=ep.epis_url, |
975 | section=ep.section, description=ep.description, |
976 | - duration=ep.duration, episode_id=ep.epis_id, |
977 | + duration=ep.duration, episode_id=episode_id, |
978 | image_url=ep.image_url, season=ep.season) |
979 | - |
980 | - # check if already collected, verifying all is ok |
981 | - if ep.epis_id in collected: |
982 | - previous = collected[ep.epis_id] |
983 | - if previous == info: |
984 | - continue |
985 | - else: |
986 | - raise ValueError("Bad repeated! %s and %s", previous, info) |
987 | - |
988 | - # store |
989 | - collected[ep.epis_id] = info |
990 | all_data.append(info) |
991 | return all_data |
992 | |
993 | @@ -186,7 +194,7 @@ |
994 | def main(): |
995 | """Entry point.""" |
996 | all_data = get_all_data() |
997 | - helpers.save_file("encuentro-v05", all_data) |
998 | + helpers.save_file("encuentro-v06", all_data) |
999 | |
1000 | |
1001 | if __name__ == '__main__': |
1002 | @@ -198,6 +206,6 @@ |
1003 | srv_logger.setup_log(shy) |
1004 | |
1005 | if len(sys.argv) > 1: |
1006 | - print(get_episode_info(int(sys.argv[1]))) |
1007 | + print(get_episode_info(sys.argv[1])) |
1008 | else: |
1009 | main() |
1010 | |
1011 | === modified file 'server/helpers.py' |
1012 | --- server/helpers.py 2016-01-02 17:43:59 +0000 |
1013 | +++ server/helpers.py 2017-07-08 22:31:52 +0000 |
1014 | @@ -1,6 +1,4 @@ |
1015 | -# -*- coding: utf8 -*- |
1016 | - |
1017 | -# Copyright 2012-2014 Facundo Batista |
1018 | +# Copyright 2012-2017 Facundo Batista |
1019 | # |
1020 | # This program is free software: you can redistribute it and/or modify it |
1021 | # under the terms of the GNU General Public License version 3, as published |
1022 | @@ -18,8 +16,6 @@ |
1023 | |
1024 | """A couple of helpers for server stuff.""" |
1025 | |
1026 | -from __future__ import unicode_literals |
1027 | - |
1028 | import bz2 |
1029 | import pickle |
1030 | import cgi |
1031 | @@ -28,12 +24,11 @@ |
1032 | import re |
1033 | import time |
1034 | |
1035 | -try: |
1036 | - import urlparse as parse |
1037 | - from urllib2 import HTTPError |
1038 | -except ImportError: |
1039 | - from urllib import parse |
1040 | - from urllib.error import HTTPError |
1041 | +from urllib import parse |
1042 | +from urllib.error import HTTPError |
1043 | + |
1044 | + |
1045 | +UNIQUE_ID_SEPARATOR = '--' |
1046 | |
1047 | |
1048 | def save_file(basename, data): |
1049 | @@ -51,26 +46,28 @@ |
1050 | |
1051 | |
1052 | def _weird_utf8_fixing(byteseq): |
1053 | - """Clean non-utf8 elements and decode.""" |
1054 | + """Clean non-utf8 elements and decode. |
1055 | + |
1056 | + Receive bytes, return unicode. |
1057 | + """ |
1058 | tmp = [] |
1059 | consume = 0 |
1060 | for i, c in enumerate(byteseq): |
1061 | if consume: |
1062 | consume -= 1 |
1063 | continue |
1064 | - ord_c = ord(c) |
1065 | - if ord_c <= 127: # 0... .... |
1066 | + if c <= 127: # 0... .... |
1067 | tmp.append(c) |
1068 | - elif 192 <= ord_c <= 223: # 110. .... |
1069 | + elif 192 <= c <= 223: # 110. .... |
1070 | n = byteseq[i + 1] |
1071 | - if 128 <= ord(n) <= 191: |
1072 | + if 128 <= n <= 191: |
1073 | # second byte ok |
1074 | tmp.append(c) |
1075 | tmp.append(n) |
1076 | consume = 1 |
1077 | else: |
1078 | ValueError("Unsupported fixing sequence.") |
1079 | - result = b"".join(tmp).decode("utf8") |
1080 | + result = bytes(tmp).decode("utf8") |
1081 | return result |
1082 | |
1083 | |
1084 | @@ -78,7 +75,7 @@ |
1085 | """Sanitize html.""" |
1086 | # try to decode in utf8, otherwise try in cp1252 |
1087 | try: |
1088 | - html.decode("utf8") |
1089 | + html = html.decode("utf8") |
1090 | except UnicodeDecodeError: |
1091 | try: |
1092 | html = html.decode("cp1252") |
1093 | @@ -86,7 +83,7 @@ |
1094 | html = _weird_utf8_fixing(html) |
1095 | |
1096 | # remove script stuff |
1097 | - html = re.sub(b"<script.*?</script>", b"", html, flags=re.S) |
1098 | + html = re.sub("<script.*?</script>", "", html, flags=re.S) |
1099 | return html |
1100 | |
1101 | |
1102 | @@ -172,3 +169,19 @@ |
1103 | |
1104 | text = "%02d. %s" % (number, rest.strip()) |
1105 | return text |
1106 | + |
1107 | + |
1108 | +def get_unique_id(prev_id, all_ids): |
1109 | + """Fake an ID using a separator and a number for it to be unique.""" |
1110 | + if UNIQUE_ID_SEPARATOR in prev_id: |
1111 | + p1, p2 = prev_id.split(UNIQUE_ID_SEPARATOR) |
1112 | + base_id = p1 |
1113 | + prev_number = int(p2) |
1114 | + else: |
1115 | + prev_number = 0 |
1116 | + base_id = prev_id |
1117 | + |
1118 | + while prev_id in all_ids: |
1119 | + prev_number += 1 |
1120 | + prev_id = base_id + UNIQUE_ID_SEPARATOR + str(prev_number) |
1121 | + return prev_id |
1122 | |
1123 | === removed file 'server/scrapers_cda.py' |
1124 | --- server/scrapers_cda.py 2016-01-02 17:43:59 +0000 |
1125 | +++ server/scrapers_cda.py 1970-01-01 00:00:00 +0000 |
1126 | @@ -1,60 +0,0 @@ |
1127 | -# -*- coding: utf-8 -*- |
1128 | - |
1129 | -# Copyright 205 Facundo Batista |
1130 | -# |
1131 | -# This program is free software: you can redistribute it and/or modify it |
1132 | -# under the terms of the GNU General Public License version 3, as published |
1133 | -# by the Free Software Foundation. |
1134 | -# |
1135 | -# This program is distributed in the hope that it will be useful, but |
1136 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
1137 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1138 | -# PURPOSE. See the GNU General Public License for more details. |
1139 | -# |
1140 | -# You should have received a copy of the GNU General Public License along |
1141 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
1142 | -# |
1143 | -# For further info, check https://launchpad.net/encuentro |
1144 | - |
1145 | -"""Scrapers for CDA.""" |
1146 | - |
1147 | -import bs4 |
1148 | -import json |
1149 | - |
1150 | -import helpers |
1151 | - |
1152 | - |
1153 | -def scrap_section(raw): |
1154 | - """Get useful info from main section list.""" |
1155 | - data = json.loads(raw.decode('utf8')) |
1156 | - soup = bs4.BeautifulSoup(data['html'], "html.parser") |
1157 | - for article in soup.find_all('article'): |
1158 | - image = article.find('img')['src'] |
1159 | - title = article.find('h3', itemprop='name').text.strip() |
1160 | - |
1161 | - # prepare text |
1162 | - info = article.find('div', class_='info closed') |
1163 | - parts = [] |
1164 | - for title_node in info.find_all('h3'): |
1165 | - title_text = title_node.text.strip().strip(":") |
1166 | - content_node = title_node.find_next('p') |
1167 | - content_text = content_node.text.replace('\n', '').replace('\t', '').strip() |
1168 | - if title_text == 'Sinopsis': |
1169 | - part = content_text |
1170 | - else: |
1171 | - part = "{}: {}".format(title_text, content_text) |
1172 | - parts.append(part) |
1173 | - info_text = "\n\n".join(parts) |
1174 | - |
1175 | - # prepare episodes |
1176 | - episodes = [] |
1177 | - for node_li in article.find_all('li'): |
1178 | - node_a = node_li.find('a') |
1179 | - url_parts = node_a['href'].split("/") |
1180 | - assert len(url_parts) == 6, url_parts |
1181 | - episode_id = url_parts[4] |
1182 | - text = node_a.text.strip() |
1183 | - text = helpers.enhance_number(text) |
1184 | - episodes.append((text, episode_id)) |
1185 | - |
1186 | - yield (title, image, info_text, episodes) |
1187 | |
1188 | === modified file 'server/scrapers_conect.py' |
1189 | --- server/scrapers_conect.py 2015-12-18 18:42:28 +0000 |
1190 | +++ server/scrapers_conect.py 2017-07-08 22:31:52 +0000 |
1191 | @@ -1,6 +1,4 @@ |
1192 | -# -*- coding: utf-8 -*- |
1193 | - |
1194 | -# Copyright 2012-2014 Facundo Batista |
1195 | +# Copyright 2012-2017 Facundo Batista |
1196 | # |
1197 | # This program is free software: you can redistribute it and/or modify it |
1198 | # under the terms of the GNU General Public License version 3, as published |
1199 | @@ -26,7 +24,7 @@ |
1200 | |
1201 | def scrap_series(html): |
1202 | """Get useful info from the series list.""" |
1203 | - soup = bs4.BeautifulSoup(helpers.sanitize(html)) |
1204 | + soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser") |
1205 | |
1206 | episodes_list = soup.find('ul', id='listaEpisodios') |
1207 | results = [] |
1208 | @@ -57,7 +55,7 @@ |
1209 | |
1210 | def scrap_video(html): |
1211 | """Get useful info from the video page.""" |
1212 | - soup = bs4.BeautifulSoup(helpers.sanitize(html)) |
1213 | + soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser") |
1214 | |
1215 | item = soup.find('p', class_='duracion') |
1216 | if item is not None: |
1217 | |
1218 | === modified file 'server/scrapers_dqsv.py' |
1219 | --- server/scrapers_dqsv.py 2015-09-01 14:31:59 +0000 |
1220 | +++ server/scrapers_dqsv.py 2017-07-08 22:31:52 +0000 |
1221 | @@ -1,6 +1,6 @@ |
1222 | #!/usr/bin/env python3 |
1223 | |
1224 | -# Copyright 2014 Facundo Batista |
1225 | +# Copyright 2014-2017 Facundo Batista |
1226 | # |
1227 | # This program is free software: you can redistribute it and/or modify it |
1228 | # under the terms of the GNU General Public License version 3, as published |
1229 | @@ -115,7 +115,8 @@ |
1230 | |
1231 | def _fix_name(name): |
1232 | """Fix and improve the name info.""" |
1233 | - name = name.replace(""", '"') |
1234 | + name = name.replace(""", '"') # translate quotes |
1235 | + name = name.split('<')[0] # ignore everything after html tag |
1236 | return name |
1237 | |
1238 | |
1239 | |
1240 | === modified file 'server/scrapers_encuen.py' |
1241 | --- server/scrapers_encuen.py 2014-04-25 21:09:25 +0000 |
1242 | +++ server/scrapers_encuen.py 2017-07-08 22:31:52 +0000 |
1243 | @@ -1,6 +1,6 @@ |
1244 | # -*- coding: utf-8 -*- |
1245 | |
1246 | -# Copyright 2012-2014 Facundo Batista |
1247 | +# Copyright 2012-2017 Facundo Batista |
1248 | # |
1249 | # This program is free software: you can redistribute it and/or modify it |
1250 | # under the terms of the GNU General Public License version 3, as published |
1251 | @@ -18,37 +18,122 @@ |
1252 | |
1253 | """Some scrapers.""" |
1254 | |
1255 | +import re |
1256 | + |
1257 | +from urllib import parse |
1258 | + |
1259 | import bs4 |
1260 | |
1261 | +from slimit import ast |
1262 | +from slimit.parser import Parser |
1263 | +from slimit.visitors import nodevisitor |
1264 | + |
1265 | # we execute this script from inside the directory; pylint: disable=W0403 |
1266 | import helpers |
1267 | |
1268 | - |
1269 | -def scrap_programa(html): |
1270 | +# ordered by preference |
1271 | +QUALITY_LABELS = [ |
1272 | + "Calidad muy alta", |
1273 | + "Calidad alta", |
1274 | + "Calidad estándar", |
1275 | + "Calidad baja", |
1276 | +] |
1277 | + |
1278 | + |
1279 | +def scrap_program(html): |
1280 | """Get useful info from a program.""" |
1281 | - soup = bs4.BeautifulSoup(helpers.sanitize(html)) |
1282 | - episodes_list = soup.find('ul', id='listaEpisodios') |
1283 | - episodes_result = [] |
1284 | - if episodes_list is not None: |
1285 | - season = episodes_list.find('h2') |
1286 | - season_title = helpers.clean_html(season.text) |
1287 | - |
1288 | - episodes = episodes_list.find_all('li') |
1289 | - for episode in episodes[1:]: # first episode is html weirdy |
1290 | - a_tag = episode.find('a') |
1291 | - link = a_tag['href'] |
1292 | - title = helpers.clean_html(a_tag.text) |
1293 | - |
1294 | - # store it |
1295 | - episodes_result.append((season_title, title, link)) |
1296 | - |
1297 | - duration_result = None |
1298 | - # get only duration from the metadata body |
1299 | - metadata = soup.find('div', class_="cuerpoMetadata informacion") |
1300 | - if metadata is not None: |
1301 | - duration_tag = metadata.find('p', class_='duracion') |
1302 | - if duration_tag is not None: |
1303 | - duration_text = duration_tag.text.split()[1] |
1304 | - duration_result = int(duration_text) |
1305 | - |
1306 | - return duration_result, episodes_result |
1307 | + soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser") |
1308 | + |
1309 | + if soup.find('div', 'overlay-sin-video'): |
1310 | + # not downloadable program |
1311 | + return |
1312 | + |
1313 | + epis_url = soup.find('a', id='download')['href'] |
1314 | + duration = None |
1315 | + epis_id = parse.parse_qs(parse.urlsplit(epis_url).query)['rec_id'][0] |
1316 | + title = soup.find('h3').text.strip() |
1317 | + description = soup.find('div', 'text-sinopsis').p.text.strip() |
1318 | + |
1319 | + duration_node = soup.find('p', id='program-duration') |
1320 | + if duration_node is None: |
1321 | + duration = None |
1322 | + else: |
1323 | + duration = int(re.search("(\d+)", duration_node.text).groups()[0]) |
1324 | + |
1325 | + return title, epis_id, duration, epis_url, description |
1326 | + |
1327 | + |
1328 | +def scrap_series(html): |
1329 | + """Get the program info from the series.""" |
1330 | + soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser") |
1331 | + |
1332 | + # build the seasons dict |
1333 | + seasons = {} |
1334 | + for info in soup.find_all(lambda tag: tag.name == 'a' and tag.get('season-id', False)): |
1335 | + season_id = info['season-id'] |
1336 | + season_number = season_id.split("-")[1] |
1337 | + season_shifted = str(int(season_number) + 1) |
1338 | + seasons[season_shifted] = info.text.strip() |
1339 | + |
1340 | + episodes = [] |
1341 | + for info in soup.find_all('a', text='ver episodio'): |
1342 | + season_id = info['season'] |
1343 | + program_id = info['program-id'] |
1344 | + episodes.append((seasons[season_id], program_id)) |
1345 | + return episodes |
1346 | + |
1347 | + |
1348 | +def scrap_list(html): |
1349 | + """Get the program info from the listing.""" |
1350 | + soup = bs4.BeautifulSoup(helpers.sanitize(html), "html.parser") |
1351 | + episodes = [] |
1352 | + for info in soup.find_all('div', class_='programa-view'): |
1353 | + link = info.parent['href'] |
1354 | + image = info.find('img')['src'] |
1355 | + title = info.find('div', 'title-img-info').text.strip() |
1356 | + episodes.append((link, image, title)) |
1357 | + return episodes |
1358 | + |
1359 | + |
1360 | +def scrap_bestvideo(html): |
1361 | + """Get the best video from the program sources listing. |
1362 | + |
1363 | + Return None if any of the steps fail: not all pages have this info, and the caller will |
1364 | + fallback to other means of getting the video URL. |
1365 | + """ |
1366 | + # get the script from the html |
1367 | + soup = bs4.BeautifulSoup(html, "html.parser") |
1368 | + for script_node in soup.find_all('script'): |
1369 | + if 'playlist' in script_node.text: |
1370 | + break |
1371 | + else: |
1372 | + # no playlist found |
1373 | + return |
1374 | + script_src = script_node.text.strip() |
1375 | + |
1376 | + # get the sources from the script |
1377 | + parser = Parser() |
1378 | + tree = parser.parse(script_src) |
1379 | + for node in nodevisitor.visit(tree): |
1380 | + if isinstance(node, ast.Assign) and getattr(node.left, 'value', None) == '"sources"': |
1381 | + break |
1382 | + else: |
1383 | + # no sources found |
1384 | + return |
1385 | + |
1386 | + # collect all the qualities from the sources list |
1387 | + qualities = {} |
1388 | + for source in node.right.children(): |
1389 | + label = url = None |
1390 | + for node in source.children(): |
1391 | + if node.left.value == '"label"': |
1392 | + label = node.right.value.strip('"') |
1393 | + if node.left.value == '"file"': |
1394 | + url = node.right.value.strip('"') |
1395 | + if label is not None and url is not None: |
1396 | + qualities[label] = url |
1397 | + |
1398 | + # get the best quality |
1399 | + for label in QUALITY_LABELS: |
1400 | + if label in qualities: |
1401 | + return qualities[label] |
1402 | |
1403 | === modified file 'server/srv_logger.py' |
1404 | --- server/srv_logger.py 2013-06-01 18:55:04 +0000 |
1405 | +++ server/srv_logger.py 2017-07-08 22:31:52 +0000 |
1406 | @@ -29,7 +29,7 @@ |
1407 | """Log setup.""" |
1408 | _rootlogger = logging.getLogger("") |
1409 | _rootlogger.setLevel(logging.DEBUG) |
1410 | - formatter = logging.Formatter('%(asctime)s %(levelname)7s ' |
1411 | + formatter = logging.Formatter('%(asctime)s %(levelname)-7s ' |
1412 | '%(name)s: %(message)s') |
1413 | |
1414 | # stdout |
1415 | |
1416 | === modified file 'test' |
1417 | --- test 2015-12-29 11:51:06 +0000 |
1418 | +++ test 2017-07-08 22:31:52 +0000 |
1419 | @@ -1,10 +1,10 @@ |
1420 | #!/bin/bash |
1421 | # |
1422 | -# Copyright 2014-2015 Facundo Batista |
1423 | +# Copyright 2014-2017 Facundo Batista |
1424 | |
1425 | set -eu |
1426 | |
1427 | -fades -r requirements_py2.txt --python=python2 -x nosetests -v -s tests --exclude=test_dqsv_scrapers.py --exclude=test_ted1_scrapers.py --exclude=test_cda_scrapers.py |
1428 | -fades -r requirements_py3.txt -x nosetests -v -s tests/test_dqsv_scrapers.py tests/test_ted1_scrapers.py tests/test_cda_scrapers.py |
1429 | -flake8 --max-line-length=99 encuentro server |
1430 | +PYTHONPATH=server fades -r requirements_py3.txt -x nosetests -v -s tests |
1431 | +fades -d flake8 -x flake8 --max-line-length=99 server |
1432 | +fades -p python2 -d flake8 -x flake8 --max-line-length=99 encuentro |
1433 | pylint -d R,C,W,E -e C0111,C0112 -r n -f colorized --no-docstring-rgx="(__.*__|test_*)" encuentro server 2> /dev/null |
1434 | |
1435 | === removed file 'tests/ej-cda-main-1.json' |
1436 | --- tests/ej-cda-main-1.json 2015-12-29 11:51:06 +0000 |
1437 | +++ tests/ej-cda-main-1.json 1970-01-01 00:00:00 +0000 |
1438 | @@ -1,1 +0,0 @@ |
1439 | -{"code":200,"message":"Ok","html":"<section id=\"page-1\" class=\"container ajax-page\"><section class=\"list\" data-type=\"items\"><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/3023\/micros-filma-tu-aldea\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/2\/17012_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Micros: Filma Tu Aldea<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Mientras van viajando por el interior del pa\u00eds, Ir\u00e0n conociendo la gente, los cuentos, los mitos y leyendas que construyen nuestra propia identidad. Y as\u00ed cumplir un viejo sue\u00f1o, hacer un puente para que la gente cuente en primera persona sus propias historias.<\/p>\n <h3>Plan de Fomento: <\/h3><p>Acua Federal<\/p><div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\">Claudio Sambi<\/p><\/div><div itemprop=\"director\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><h3>Director: <\/h3><p itemprop=\"name\">Ariel Tcach<\/p><\/div><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3011\/villa-gesell\">Villa Gesell<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3014\/carmen-de-areco\">Carmen de Areco<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3012\/gouin\">Gouin<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3013\/lima-zarate\">Lima Z\u00e1rate<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3015\/capilla-del-monte\">Capilla del Monte<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3021\/carhue\">Carhue<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3016\/rodeo\">Rodeo<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3017\/tres-sargentos\">Tres Sargentos<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3022\/san-miguel\">San Miguel<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3010\/belen\">Bel\u00e9n<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3018\/junin-de-los-andes\">Junin de los Andes<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3019\/delta-tigre\">Delta Tigre<\/a><\/li><li><a href=\"\/serie\/3023\/micros-filma-tu-aldea#!\/3020\/san-martin-de-los-andes\">San Mart\u00edn de los Andes<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/2\/17012_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2016-12-21 16:55:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/6178\/en-foco\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/7\/33617_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">En Foco<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Actores como Hugo Arana, Alejandra Dar\u00edn, entre otros, junto a el Sindicato de Televisi\u00f3n se unen para realizar capacitaciones en las provincias. Los talleres dan como resultado una experiencia \u00fanica para los profesionales de las provincias visitadas. Por primera vez en la historia se propone el est\u00edmulo para la creaci\u00f3n audiovisual en t\u00e9rminos locales.<\/p>\n <h3>Plan de Fomento: <\/h3><p>Producciones exclusivas TDA<\/p><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/6178\/en-foco#!\/6141\/posadas\">Posadas<\/a><\/li><li><a href=\"\/serie\/6178\/en-foco#!\/6142\/mendoza\">Mendoza<\/a><\/li><li><a href=\"\/serie\/6178\/en-foco#!\/6143\/parana\">Paran\u00e1<\/a><\/li><li><a href=\"\/serie\/6178\/en-foco#!\/6144\/especial\">Especial<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/7\/33617_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2015-06-17 15:14:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix break\"><a href=\"\/serie\/5837\/historias-que-valen-micros\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/0\/31640_m.png\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Historias que Valen Micros<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5830\/cap01-amor-micro-\">Cap.01 Amor Micro <\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5829\/cap02-esfuerzo-micro-\">Cap.02 Esfuerzo Micro <\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5828\/cap03-tecnica-batik-micro\">Cap.03 T\u00e9cnica Batik Micro<\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5840\/cap04-esteros-del-ibera-micro-\">Cap.04 Esteros del Iber\u00e1 Micro <\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5826\/cap05-vocacion-micro-\">Cap.05 Vocaci\u00f3n Micro <\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5825\/cap06-coraje-micro\">Cap.06 Coraje Micro<\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5824\/cap07-patria-micro\">Cap.07 Patria Micro<\/a><\/li><li><a href=\"\/serie\/5837\/historias-que-valen-micros#!\/5823\/cap08-el-rincon-de-los-amigos-micro\">Cap.08 El Rinc\u00f3n de los Amigos Micro<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/0\/31640_player.png\"\/><meta itemprop=\"datePublished\" content=\"2015-05-07 16:08:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/8\/30178_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Sabores de una Argentina Grande <\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5490\/cap01-liz-zimmer-cordoba-che-vap-kiche-receta-de-croacia\">Cap.01 Liz Zimmer - C\u00f3rdoba- Che Vap Kich\u00e9 receta de Croacia<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5489\/cap02-yolanda-sotomayor-la-rioja-pastelitos-chuquenos\">Cap.02 Yolanda Sotomayor- La Rioja- Pastelitos Chuque\u00f1os<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5488\/cap03-marta-matacata-salta-frangollo\">Cap.03 Marta Matacata - Salta - Frangollo<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5540\/cap04-irma-rodriguez-salta-empanada-saltena\">Cap.04 Irma Rodriguez - Salta - Empanada Salte\u00f1a<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5539\/cap05-agapita-soto-coctaca-calapurca\">Cap.05 Agapita Soto - Coctaca - Calapurca<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5487\/cap06-josefina-vilte-guiso-de-papa-verde-con-yuspiche-de-trigo\">Cap.06 Josefina Vilte - Guiso de papa verde con yuspiche de trigo<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5486\/cap07-ana-barion-lomo-de-atun\">Cap.07 Ana Bari\u00f3n - Lomo de at\u00fan<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5485\/cap08-carlos-pasquali-kulich\">Cap.08 Carlos Pasquali - Kulich<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5484\/cap09-fany-torres-empanadas-arabes\">Cap.09 Fany Torres - Empanadas \u00e1rabes<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5483\/cap10-henry-sanchez-carne-a-la-olla-cuadrada\">Cap.10 Henry Sanchez - Carne a la Olla Cuadrada<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5482\/cap11-rita-cristina-rubiolo-carre-de-cerdo-con-salsa-de-chudney\">Cap.11 Rita Cristina Rubiolo - Carre de cerdo con salsa de chudney<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5481\/cap12-susana-dalacosta-ensalada-de-lidric-con-chinchines\">Cap.12 Susana Dalacosta - Ensalada de lidric con chinchines<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/5480\/cap13-daniel-marso-chupin-de-pescado\">Cap.13 Daniel Mars\u00f3 - Chup\u00edn de Pescado<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6368\/cap14-rosa-zaher-cordoba-namura\">Cap.14 Rosa Zaher - C\u00f3rdoba: Namura<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6367\/cap15-norma-del-valle-barrera-ravioles-de-espinaca-y-seso\">Cap.15 Norma del Valle Barrera - Ravioles de espinaca y seso<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6365\/cap16-elizabeth-san-miguel-de-tucuman-pastel-de-novios\">Cap.16 Elizabeth - San Miguel de Tucum\u00e1n - Pastel de Novios<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6468\/cap17-silvia-varela-chilecito-la-rioja-api-de-zapallo\">Cap.17 Silvia Varela - Chilecito, La Rioja - Api de Zapallo<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6467\/cap18-rita-del-rosario-reynaga-amaicha-del-valle-tucuman-tamales\">Cap.18 Rita del Rosario Reynaga - Amaicha del Valle, Tucum\u00e1n - Tamales<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6363\/cap19-elvira-medina-villa-dolores-cordoba-ravioles-caseros\">Cap.19 Elvira Medina - Villa Dolores, C\u00f3rdoba - Ravioles caseros<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6362\/cap20-juan-carlos-pared-diamante-entre-rios-sabalo-dorado\">Cap.20 Juan Carlos Pared - Diamante, Entre R\u00edos - S\u00e1balo dorado<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6361\/cap21-sofia-schvartz-concepcion-del-uruguay-torta-leika\">Cap.21 Sof\u00eda Schvartz - Concepci\u00f3n del Uruguay - Torta Leika<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6360\/cap22-mirta-puig-rosario-santa-fe-empanada-de-carne-cortada-a-cuchillo\">Cap.22 Mirta Puig - Rosario, Santa Fe - Empanada de carne cortada a cuchillo<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6359\/cap23-jorge-nielsen-colonia-suiza-rio-negro-curanto\">Cap.23 Jorge Nielsen - Colonia Suiza, R\u00edo Negro - Curanto<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6358\/cap24-silvia-cristina-sonntagsc-lipetren-chico-rio-negro-con-con\">Cap.24 Silvia Cristina Sonntagsc - Lipetren Chico, R\u00edo Negro - Con Con<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6356\/cap25-edith-cardenas-puerto-manzano-neuquen-tarta-de-ruibarbo\">Cap.25 Edith C\u00e1rdenas - Puerto Manzano, Neuqu\u00e9n - Tarta de Ruibarbo<\/a><\/li><li><a href=\"\/serie\/5531\/sabores-de-una-argentina-grande-#!\/6603\/cap26-magdalena-pocco-villa-la-angostura-neuquen-pastel-de-papa-con-carne\">Cap.26 Magdalena Pocco - Villa La Angostura, Neuqu\u00e9n - Pastel de papa con carne<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/8\/30178_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2015-04-09 15:23:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/5404\/la-palabra-incluye\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/4\/29444_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">La Palabra Incluye<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>El Encuentro Federal de la Palabra es un espacio de reflexi\u00f3n sobre el instrumento m\u00e1s valioso de la democracia: la palabra. Un lugar donde pensar nuevas formas de participaci\u00f3n, de inclusi\u00f3n y de di\u00e1logo. Un sitio com\u00fan para dar cita a las voces de todo el pa\u00eds. Para encontrarnos con las lenguas que llegaron en las voces de los inmigrantes, las lenguas que resisten en las voces de los pueblos originarios y las que, mirando al futuro, forman parte de las voces de los j\u00f3venes. Un \u00e1mbito para alentar la b\u00fasqueda irrenunciable de pensar en la palabra desde sus or\u00edgenes como creaci\u00f3n colectiva, como herramienta fundamental, como instrumento de inclusi\u00f3n, de pertenencia y de identidad. Son diez encuentros dentro del Encuentro pensados para tomar, vivir, desarmar, volver a armar y compartir la palabra. Porque la literatura es palabra pero tambi\u00e9n el periodismo, la canci\u00f3n, el relato deportivo, el humor y la improvisaci\u00f3n. Porque una novela se erige sobre la palabra, pero tambi\u00e9n lo hace el cine, el radioteatro y la televisi\u00f3n. Porque trascienden los fil\u00f3sofos y grandes pensadores, pero, adem\u00e1s, los narradores orales y las leyendas que se agigantan de boca en boca. Y, sobre todo, porque la palabra se hace verbo en los pueblos que la enuncian, se la apropian y la transforman. Por eso, escritores, pensadores, dramaturgos, cineastas, m\u00fasicos, historietistas, especialistas en culturas digitales y el p\u00fablico se encuentran en el Parque del Bicentenario.<\/p>\n <\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/5404\/la-palabra-incluye#!\/5406\/cap01-aprendizaje-\">Cap.01 Aprendizaje <\/a><\/li><li><a href=\"\/serie\/5404\/la-palabra-incluye#!\/5410\/cap02-identidad-\">Cap.02 Identidad <\/a><\/li><li><a href=\"\/serie\/5404\/la-palabra-incluye#!\/5411\/cap03-democracia\">Cap.03 Democracia<\/a><\/li><li><a href=\"\/serie\/5404\/la-palabra-incluye#!\/5412\/cap04-encuentro\">Cap.04 Encuentro<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/4\/29444_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2015-03-26 12:48:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix break\"><a href=\"\/serie\/5079\/sabias-que\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/2\/27702_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">\u00bfSab\u00edas Qu\u00e9?<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>\u00a0\u00bfSab\u00edas que..? Ser\u00e1 la pregunta que guiar\u00e1 \u00e9ste ciclo de temas sobre la naturaleza, el medioambiente, entre otros. En distintos rincones del pa\u00eds habr\u00e1 una respuesta para cada interrogante.\u00a0\u00a0\u00a0\u00a0<\/p>\n <h3>Plan de Fomento: <\/h3><p>Material Cedido Encuentro Paka Paka<\/p><div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\">Paka Paka<\/p><\/div><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/5079\/sabias-que#!\/5067\/cap01\">Cap.01<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5066\/cap02\">Cap.02<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5065\/cap03\">Cap.03<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5072\/cap04\">Cap.04<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5071\/cap05\">Cap.05<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5070\/cap06\">Cap.06<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5069\/cap07\">Cap.07<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5068\/cap08\">Cap.08<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5077\/cap09\">Cap.09<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5076\/cap10\">Cap.10<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5075\/cap11\">Cap.11<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5074\/cap12\">Cap.12<\/a><\/li><li><a href=\"\/serie\/5079\/sabias-que#!\/5073\/cap13\">Cap.13<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/2\/27702_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2015-01-20 12:49:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/4903\/puertos-y-astilleros\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/1\/27761_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Puertos y Astilleros<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Recorremos los grandes puertos y astilleros de la provincia de Buenos Aires, para conocer a su gente, el estilo de vida que llevan, la importancia de sus funciones en el trabajo y la producci\u00f3n relevante para la importaci\u00f3n y exportaci\u00f3n el pa\u00eds.<\/p>\n <div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\">La Azotea<\/p><\/div><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4890\/cap01\">Cap.01<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4895\/cap02\">Cap.02<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4894\/cap03\">Cap.03<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4893\/cap04\">Cap.04<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4901\/cap05\">Cap.05<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4900\/cap06\">Cap.06<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4892\/cap07\">Cap.07<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4899\/cap08\">Cap.08<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4898\/cap09\">Cap.09<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4891\/cap10\">Cap.10<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4897\/cap11\">Cap.11<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4896\/cap12\">Cap.12<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4889\/cap13\">Cap.13<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4888\/cap14\">Cap.14<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4887\/cap15\">Cap.15<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4886\/cap16\">Cap.16<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4902\/cap17\">Cap.17<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4885\/cap18\">Cap.18<\/a><\/li><li><a href=\"\/serie\/4903\/puertos-y-astilleros#!\/4884\/cap19\">Cap.19<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/1\/27761_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2014-12-17 14:42:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/4599\/neuropolis-autoayudador\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/7\/25547_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Neur\u00f3polis: Autoayudador<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>El Autoayudador es un personaje que pregona la paz y el amor, un gur\u00fa new age. Uno de los muchos que editan los tan populares libros de autoayuda. Al contrario de su pr\u00e9dica pacifista, de amor y espiritualidad, es un persona ambiciosa, ego\u00edsta y violenta. En los diferentes cap\u00edtulos se lo ver\u00e1 en distintas situaciones de la vida cotidiana y all\u00ed veremos su doble moral: por un lado lo que pregona en p\u00fablico y sus peque\u00f1os actos en los que queda al descubierto su lado oscuro.<\/p>\n <h3>Actores: <\/h3><p><span itemprop=\"actor\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><span itemprop=\"name\">Fabi\u00e1n Arenillas<\/span><\/span>, \n\t\t\t<span itemprop=\"actor\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><span itemprop=\"name\"> Paula Broner<\/span><\/span>, \n\t\t\t<span itemprop=\"actor\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><span itemprop=\"name\"> Marcelo Mazzarello\t<\/span><\/span><\/p><div itemprop=\"producer\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><h3>Gui\u00f3n: <\/h3><p itemprop=\"name\">Pablo Mir<\/p><\/div><div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\"> Pablo Garc\u00eda<\/p><\/div><div itemprop=\"director\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><h3>Director: <\/h3><p itemprop=\"name\">Marcelo Bassi<\/p><\/div><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4573\/autoayudador-cap01\">Autoayudador Cap.01<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4572\/autoayudador-cap02\">Autoayudador Cap.02<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4571\/autoayudador-cap03\">Autoayudador Cap.03<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4576\/autoayudador-cap04\">Autoayudador Cap.04<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4589\/autoayudador-cap05\">Autoayudador Cap.05<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4617\/autoayudador-cap06\">Autoayudador Cap.06<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4592\/autoayudador-cap07\">Autoayudador Cap.07<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4616\/autoayudador-cap08\">Autoayudador Cap.08<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4575\/autoayudador-cap09\">Autoayudador Cap.09<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4574\/autoayudador-cap10\">Autoayudador Cap.10<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4594\/autoayudador-cap11\">Autoayudador Cap.11<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4578\/autoayudador-cap12\">Autoayudador Cap.12<\/a><\/li><li><a href=\"\/serie\/4599\/neuropolis-autoayudador#!\/4577\/autoayudador-cap13\">Autoayudador Cap.13<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/7\/25547_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2014-11-25 13:51:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix break\"><a href=\"\/serie\/4333\/micros-del-amor\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/0\/23360_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Micros del Amor<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Personas con diferentes profesiones e inquietudes responden a una misma pregunta: \u00bfQu\u00e9 es el amor? As\u00ed, se plantea el punto de partida de qu\u00e9 los motiva y los apasiona y porqu\u00e9 cada acto que realizan es la b\u00fasqueda de la plenitud.<\/p>\n <div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\">Astro Films<\/p><\/div><div itemprop=\"director\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><h3>Director: <\/h3><p itemprop=\"name\">Edgar Arico<\/p><\/div><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4341\/cap01-juan-danna-a-la-plastica-\">Cap.01 Juan Danna, a la Pl\u00e1stica <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4338\/cap02-ricardo-kaufman-al-origami-\">Cap.02 Ricardo Kaufman, al Origami <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4326\/cap03-alejandro-sanchez-a-la-patria-\">Cap.03 Alejandro S\u00e1nchez, a la Patria <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4327\/cap04-daniel-tangona-a-la-actividad-fisica-\">Cap.04 Daniel Tangona, a la Actividad F\u00edsica <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4325\/cap05-javier-archenzio-a-las-caricaturas-\">Cap.05 Javier Archenzio, a las Caricaturas <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4372\/cap06-martin-demonte-por-lo-que-hace\">Cap.06 Mart\u00edn Demonte, Por lo que Hace<\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4323\/cap07-cristina-sciales-a-la-medicina-\">Cap.07 Cristina Sciales, A la Medicina <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4339\/cap08-jose-villa-a-la-numismatica-\">Cap.08 Jos\u00e9 Villa, a la Numism\u00e1tica <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4340\/cap09-jose-luis-sojo-artesano-en-cobre-\">Cap.09 Jos\u00e9 Luis Sojo, Artesano en Cobre <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4328\/cap10-karen-levy-al-deporte-los-chicos-y-gen\">Cap.10 Karen Levy, al Deporte, los Chicos y Gen<\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4321\/cap11-mora-furtado-al-trabajo-y-la-familia-\">Cap.11 Mora Furtado, al Trabajo y la Familia <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4314\/cap12-erica-di-cione-\">Cap.12 Erica Di Cione <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4315\/cap13-david-peralta-deporte-y-las-capacidades-\">Cap.13 David Peralta, Deporte y las Capacidades <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4318\/cap14-monica-posse-a-la-musica-\">Cap.14 M\u00f3nica Posse, a la M\u00fasica <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4317\/cap15-el-amor-en-general-\">Cap.15 El Amor en General <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4316\/cap16-diego-ereserega-deporte-y-capacidades-\">Cap.16 Diego Ereserega, Deporte y Capacidades <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4322\/cap17-cloty-y-tito-samelnik-pareja-y-familia-\">Cap.17 Cloty y Tito Samelnik, Pareja y Familia <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4329\/cap18-tito-samelnik-al-diseno-\">Cap.18 Tito Samelnik, Al Dise\u00f1o <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4324\/cap19-cloty-samelnik-amor-al-diseno-\">Cap.19 Cloty Samelnik, Amor al Dise\u00f1o <\/a><\/li><li><a href=\"\/serie\/4333\/micros-del-amor#!\/4337\/cap20-silvia-fleitas-a-la-musica-al-escenario-\">Cap.20 Silvia Fleitas, a la M\u00fasica, al Escenario <\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/0\/23360_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2014-10-27 16:16:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/4266\/de-grande\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/3\/22783_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">De Grande<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Los prejuicios de los ni\u00f1os, j\u00f3venes, adultos y adultos mayores en relaci\u00f3n a la vejez y sus planes para los pr\u00f3ximos a\u00f1os. Una invitaci\u00f3n a reflexionar y planificar nuestro futuro.<\/p>\n <\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/4266\/de-grande#!\/4262\/cap01-lugares\">Cap.01 Lugares<\/a><\/li><li><a href=\"\/serie\/4266\/de-grande#!\/4261\/cap02-fisico\">Cap.02 F\u00edsico<\/a><\/li><li><a href=\"\/serie\/4266\/de-grande#!\/4260\/cap03-desayuno\">Cap.03 Desayuno<\/a><\/li><li><a href=\"\/serie\/4266\/de-grande#!\/4259\/cap04-musica\">Cap.04 M\u00fasica<\/a><\/li><li><a href=\"\/serie\/4266\/de-grande#!\/4265\/cap05-cotidiano\">Cap.05 Cotidiano<\/a><\/li><li><a href=\"\/serie\/4266\/de-grande#!\/4264\/cap06-comida\">Cap.06 Comida<\/a><\/li><li><a href=\"\/serie\/4266\/de-grande#!\/4263\/cap07-imaginacion\">Cap.07 Imaginaci\u00f3n<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/3\/22783_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2014-10-22 12:13:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix\"><a href=\"\/serie\/4128\/cronicas-de-abecedario\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/6\/21726_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Cr\u00f3nicas de Abecedario<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Cr\u00f3nicas de Abecedario es una miniserie de animaci\u00f3n que se sumerge en una sociedad de letras, la cual, se ve perturbada por la noticia de que quieren sacar a la letra W del abecedario. Las vocales, protagonistas de esta historia, har\u00e1n propia esta lucha por intentar que esto no se lleve a cabo, promoviendo el compromiso y la acci\u00f3n social, vali\u00e9ndose de los medios para divulgar sus propuestas e ideas.<\/p>\n <h3>Plan de Fomento: <\/h3><p>Series de Animaciones para Productoras con antecedentes 2011<\/p><div itemprop=\"producer\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><h3>Gui\u00f3n: <\/h3><p itemprop=\"name\">Gerardo Mansur<\/p><\/div><div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\">Juan Pablo Faccioli<\/p><\/div><div itemprop=\"director\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Person\"><h3>Director: <\/h3><p itemprop=\"name\">Gerardo Mansur<\/p><\/div><\/div><\/div><a href=\"\/serie\/4128\/cronicas-de-abecedario#!\/21346\/avances\" class=\"trigger ver-trailer\">Avances<\/a><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/4128\/cronicas-de-abecedario#!\/4127\/cap01-la-noticia-\">Cap.01 La Noticia <\/a><\/li><li><a href=\"\/serie\/4128\/cronicas-de-abecedario#!\/4126\/cap02-el-debate\">Cap.02 El Debate<\/a><\/li><li><a href=\"\/serie\/4128\/cronicas-de-abecedario#!\/4125\/cap03-la-accion\">Cap.03 La Acci\u00f3n<\/a><\/li><li><a href=\"\/serie\/4128\/cronicas-de-abecedario#!\/4129\/cap04-el-resultado\">Cap.04 El Resultado<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/6\/21726_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2014-10-02 12:09:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><article itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/TVSeries\" class=\"floatFix break\"><a href=\"\/serie\/3701\/nuestros-derechos-cuentan\" itemprop=\"url\"><img src=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/5\/21825_m.jpg\" alt=\"\" class=\"pic\"\/><span class=\"layer\"><h3 itemprop=\"name\">Nuestros Derechos Cuentan<\/h3><\/span><\/a><div class=\"item-data\"><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Info<\/span><div class=\"info closed\" data-type=\"slidebox\"><h3>Sinopsis<\/h3>\n <p>Una campa\u00f1a de spots animados que difunde los derechos del adulto mayor de acuerdo con el nuevo paradigma gerontol\u00f3gico. En un tono costumbrista, la serie ejemplifica la vulneraci\u00f3n de esos derechos a trav\u00e9s de dramatizaciones de la vida diaria, f\u00e1cilmente reconocibles por cualquiera. Y, al mismo tiempo, nos interpela promoviendo la reivindicaci\u00f3n activa y orgullosa de esos derechos.\u00a0<\/p>\n <div itemprop=\"productionCompany\" itemscope=\"itemscope\" itemtype=\"http:\/\/schema.org\/Organization\"><h3>Productora: <\/h3><p itemprop=\"name\">Lanzallamas<\/p><\/div><\/div><\/div><div class=\"expandbox\" data-toggle=\"close\"><span class=\"trigger\" role=\"toggle-box\">Ver Cap\u00edtulos<\/span><ul class=\"closed\" data-type=\"slidebox\"><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3700\/decidir\">Decidir<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3699\/intimidad\">Intimidad<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3698\/nietos\">Nietos<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3697\/participar\">Participar<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3696\/jubilacion\">Jubilaci\u00f3n<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3695\/salud\">Salud<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3694\/entorno\">Entorno<\/a><\/li><li><a href=\"\/serie\/3701\/nuestros-derechos-cuentan#!\/3693\/respeto\">Respeto<\/a><\/li><\/ul><\/div><\/div><meta itemprop=\"image\" content=\"http:\/\/cda.gob.ar\/content\/photos\/generated\/5\/21825_player.jpg\"\/><meta itemprop=\"datePublished\" content=\"2014-08-27 14:42:00\"\/><meta itemprop=\"publisher\" content=\"Contenidos Digitales Abiertos\"\/><\/article><\/section><\/section>\n","total":"30"} |
1440 | \ No newline at end of file |
1441 | |
1442 | === added file 'tests/ej-dqsv-11.swf' |
1443 | Binary files tests/ej-dqsv-11.swf 1970-01-01 00:00:00 +0000 and tests/ej-dqsv-11.swf 2017-07-08 22:31:52 +0000 differ |
1444 | === added file 'tests/ej-encuen-bestvideo-1.html' |
1445 | --- tests/ej-encuen-bestvideo-1.html 1970-01-01 00:00:00 +0000 |
1446 | +++ tests/ej-encuen-bestvideo-1.html 2017-07-08 22:31:52 +0000 |
1447 | @@ -0,0 +1,119 @@ |
1448 | +<!DOCTYPE html> |
1449 | +<html lang="en"> |
1450 | + <head> |
1451 | + <meta charset="utf-8"> |
1452 | + <title>Andres Nocioni</title> |
1453 | + <meta name="description" content="De Barcelona a Indianápolis. De Mánchester a París. De Madrid a Nueva York... y más. Víctor Hugo Morales recorre el mundo visitando a grandes estrellas del deporte que hacen historia. Una visita a los lugares que los vieron convertirse en verdaderos ídolos. "> |
1454 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
1455 | + |
1456 | + <meta property="og:title" content="Andres Nocioni"> |
1457 | + <meta property="og:description" content="De Barcelona a Indianápolis. De Mánchester a París. De Madrid a Nueva York... y más. Víctor Hugo Morales recorre el mundo visitando a grandes estrellas del deporte que hacen historia. Una visita a los lugares que los vieron convertirse en verdaderos ídolos. "> |
1458 | + <meta property="og:type" content="video.episode"> |
1459 | + <meta property="og:url" content="http://videos.encuentro.gob.ar/video/?id=122878"> |
1460 | + <meta property="og:image" content="http://videos.encuentro.gob.ar/repositorio/imagen/ver?image_id=47b23792-4ef6-4053-b0c1-c91ad2e7f9b8"> |
1461 | + <meta property="og:locale" content="es_ES"> |
1462 | + |
1463 | + <!-- Como son pocos estilos los ponemos en el mismo documento para ahorrarnos un request --> |
1464 | + <style type="text/css"> |
1465 | + html, body, div { |
1466 | + margin: 0; |
1467 | + padding: 0; |
1468 | + border: 0; |
1469 | + font-size: 100%; |
1470 | + font: inherit; |
1471 | + vertical-align: baseline; |
1472 | + } |
1473 | + |
1474 | + html, body { |
1475 | + width: 100%; |
1476 | + height: 100%; |
1477 | + line-height: 1; |
1478 | + background-color: black; |
1479 | + } |
1480 | + |
1481 | + #loading { |
1482 | + font-family: monospace; |
1483 | + font-size: 11px; |
1484 | + letter-spacing: 1px; |
1485 | + text-align: center; |
1486 | + position: absolute; |
1487 | + top: 50%; |
1488 | + left: 0; |
1489 | + right: 0; |
1490 | + color: #BBB; |
1491 | + } |
1492 | + </style> |
1493 | + <script> |
1494 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
1495 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
1496 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src = g; |
1497 | + m.parentNode.insertBefore(a, m)})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); |
1498 | + ga('create', 'UA-4565877-1', 'auto'); |
1499 | + ga('send', 'pageview'); |
1500 | + </script> |
1501 | + </head> |
1502 | + <body> |
1503 | + <div id="videoplayer"><p id="loading">Cargando el reproductor de video...</p></div> |
1504 | + |
1505 | + <script src="http://libs.encuentro.gob.ar/jwplayer-7.0.3/jwplayer.js"></script> |
1506 | + <script type="text/javascript"> |
1507 | + try { document.domain = "educ.ar"; }catch (e) { console.log(e); } |
1508 | + jwplayer.key="fcr9drOh99qlewuZp5fOJoG5CxLGCq+qMTH6sm1zX14="; |
1509 | + |
1510 | + var playerInstance = jwplayer("videoplayer"); |
1511 | + playerInstance.setup({ |
1512 | + "width": "100%", |
1513 | + "height": "100%", |
1514 | + "abouttext": "Recursos educ.ar", |
1515 | + "aboutlink": "http://www.educ.ar", |
1516 | + "controls": true, |
1517 | + "autostart": false, |
1518 | + "ga": { |
1519 | + "idstring": "title", |
1520 | + "label": "mediaid" |
1521 | + }, |
1522 | + "skin": { |
1523 | + "name": "glow" |
1524 | + }, |
1525 | + "displaytitle": false, |
1526 | + "displaydescription": false, |
1527 | + "playlist": [ |
1528 | + { |
1529 | + "title": "Andres Nocioni", |
1530 | + "description": "De Barcelona a Indianápolis. De Mánchester a París. De Madrid a Nueva York... y más. Víctor Hugo Morales recorre el mundo visitando a grandes estrellas del deporte que hacen historia. Una visita a los lugares que los vieron convertirse en verdaderos ídolos. ", |
1531 | + "mediaid": 122878, |
1532 | + "image": false, |
1533 | + "sources": [ |
1534 | + { |
1535 | + "label": "Calidad baja", |
1536 | + "file": "http://videos.encuentro.gob.ar/repositorio/video/ver?file_id=c88eeeee-cf24-4481-9d3a-48485dd69d03&rec_id=122878", |
1537 | + "type": "mp4" |
1538 | + }, |
1539 | + { |
1540 | + "label": "Calidad estándar", |
1541 | + "file": "http://videos.encuentro.gob.ar/repositorio/video/ver?file_id=3782e893-34cc-4515-8e9b-ccbb76a2eedb&rec_id=122878", |
1542 | + "type": "mp4", |
1543 | + "default": true |
1544 | + }, |
1545 | + { |
1546 | + "label": "Calidad alta", |
1547 | + "file": "http://videos.encuentro.gob.ar/repositorio/video/ver?file_id=68d1879b-585b-454a-98d7-4235804e1333&rec_id=122878", |
1548 | + "type": "mp4" |
1549 | + }, |
1550 | + { |
1551 | + "label": "Calidad muy alta", |
1552 | + "file": "http://videos.encuentro.gob.ar/repositorio/video/ver?file_id=c9495dc4-c1e5-4a1c-8cae-fda9811dfe38&rec_id=122878", |
1553 | + "type": "mp4" |
1554 | + } |
1555 | + ], |
1556 | + "tracks": [] |
1557 | + } |
1558 | + ] |
1559 | +}); |
1560 | + |
1561 | + |
1562 | + |
1563 | + </script> |
1564 | + </body> |
1565 | +</html> |
1566 | + |
1567 | |
1568 | === added file 'tests/ej-encuen-bestvideo-2.html' |
1569 | --- tests/ej-encuen-bestvideo-2.html 1970-01-01 00:00:00 +0000 |
1570 | +++ tests/ej-encuen-bestvideo-2.html 2017-07-08 22:31:52 +0000 |
1571 | @@ -0,0 +1,972 @@ |
1572 | +<!DOCTYPE html> |
1573 | +<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--> |
1574 | +<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--> |
1575 | +<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--> |
1576 | +<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--> |
1577 | +<!--[if gt IE 9]><!--> |
1578 | +<!--[if lte IE 9]> |
1579 | + <link href='/frontend/css/animations-ie-fix.css' rel='stylesheet'> |
1580 | +<![endif]--> |
1581 | +<html class="no-js" lang="en"> |
1582 | +<!--<![endif]--> |
1583 | +<head> |
1584 | +<meta charset="UTF-8" /> |
1585 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
1586 | +<!-- Twitter Card data --> |
1587 | +<meta name="twitter:site" content="@canalencuentro"> |
1588 | +<meta name="twitter:title" content="Serie La lluvia (Arnaldo Antunes)"> |
1589 | +<!-- Twitter summary card with large image must be at least 280x150px --> |
1590 | +<meta name="twitter:image:src" content="http://encuentro.gob.ar/files/6 (3).jpg"> |
1591 | + |
1592 | +<!-- Open Graph data --> |
1593 | +<meta property="og:title" content="Serie La lluvia (Arnaldo Antunes)" /> |
1594 | +<meta property="og:type" content="video" /> |
1595 | +<meta property="og:url" content="http://encuentro.gob.ar/programas/series/9152" /> |
1596 | +<meta property="og:image" content="http://encuentro.gob.ar/files/6 (3).jpg" /> |
1597 | +<meta property="og:site_name" content="Canal Encuentro" /> |
1598 | +<title>Susurro y altavoz (T1), La lluvia (Arnaldo Antunes) - Canal Encuentro</title> |
1599 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
1600 | +<link href='https://fonts.googleapis.com/css?family=Asap:400,400italic,700,700italic' rel='stylesheet' type='text/css'> |
1601 | +<link rel="stylesheet" type="text/css" href="/frontend/css/encuentro.css" /> |
1602 | +<!-- <link rel="shortcut icon" href="/images/favicon.ico?v=2"> --> |
1603 | +<link rel="shortcut icon" href="/images/favicon.png?v=3"> |
1604 | +<!-- REVOLUTION STYLE SHEETS --> |
1605 | +<link rel="stylesheet" type="text/css" href="/frontend/css/settings.css"> |
1606 | +<!-- REVOLUTION LAYERS STYLES --> |
1607 | +<link rel="stylesheet" type="text/css" href="/frontend/css/layers.css"> |
1608 | +<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
1609 | +<script src="/frontend/js/menu.js"></script> |
1610 | +<script src="/frontend/js/modernizr.min.js"></script> |
1611 | +<script src="/frontend/js/bootstrap.js"></script> |
1612 | + |
1613 | +<!-- REVOLUTION JS FILES --> |
1614 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.tools.min.js"></script> |
1615 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.revolution.min.js"></script> |
1616 | + |
1617 | +<script type="text/javascript"> |
1618 | +<!-- |
1619 | +function viewport() |
1620 | +{ |
1621 | +var e = window |
1622 | +, a = 'inner'; |
1623 | +if ( !( 'innerWidth' in window ) ) |
1624 | +{ |
1625 | +a = 'client'; |
1626 | +e = document.documentElement || document.body; |
1627 | +} |
1628 | +return { width : e[ a+'Width' ] , height : e[ a+'Height' ] } |
1629 | +} |
1630 | +//--> |
1631 | +</script> |
1632 | +<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-1463165-1', 'auto');ga('set', 'anonymizeIp', true);ga('send', 'pageview');</script></head> |
1633 | + |
1634 | +<script> |
1635 | +$( document ).ready(function() { |
1636 | + //trackeo para analytics |
1637 | + $("a.ga_encuentro_track").click(function(e) { |
1638 | + var ga_category = $(e.currentTarget).data('ga_category'); |
1639 | + var ga_action = $(e.currentTarget).data('ga_action'); |
1640 | + var ga_label = $(e.currentTarget).data('ga_label'); |
1641 | + |
1642 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
1643 | + }); |
1644 | +}); |
1645 | + |
1646 | +//hago esta funcion para poder usarla desde otros lugares tambien |
1647 | +function encuentroTrackAnalytics(ga_category, ga_action, ga_label){ |
1648 | + if(typeof dondeEstoy !== 'undefined' && dondeEstoy != null){ |
1649 | + ga_category = dondeEstoy; |
1650 | + } |
1651 | + |
1652 | + ga('send', 'event', ga_category, ga_action, ga_label); |
1653 | +} |
1654 | +</script> <body> |
1655 | + <div id="wrap"> |
1656 | + <header> |
1657 | + <div class="menu"> |
1658 | + <div class="col-xs-2"> |
1659 | + <a href="/"> |
1660 | + <div class="logo"></div> |
1661 | + </a> |
1662 | + </div> |
1663 | + <div class="col-xs-2 section-m">Catálogo</div> |
1664 | + <div class="col-xs-9"> |
1665 | + <div class="search-mov"> |
1666 | + <div class="dropdown"> |
1667 | + <div class="btn btn-default dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" role="button"> |
1668 | + <p class="icon-search"></p> |
1669 | + </div> |
1670 | + <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
1671 | + <li> |
1672 | + <form action="/search/" class="navbar-form"> |
1673 | + <div class="form-group"> |
1674 | + <input type="text" name="keywords" class="form-control" placeholder=""> |
1675 | + </div> |
1676 | + <button type="submit" class="btn btn-default"> |
1677 | + <span class="icon-right-open"></span> |
1678 | + </button> |
1679 | + </form> |
1680 | + </li> |
1681 | + </ul> |
1682 | + </div> |
1683 | + </div> |
1684 | + <div class="menu_bar"> |
1685 | + <a href="#" class="bt-menu"> |
1686 | + </a> |
1687 | + </div> |
1688 | + <nav id="topmenu"> |
1689 | + <ul> |
1690 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="boton_menu" data-ga_label="inicio" href="/">Inicio</a></li> |
1691 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="boton_menu" data-ga_label="catalogo" href="http://encuentro.gob.ar/programas">Catálogo</a></li> |
1692 | + <li><a class="ga_encuentro_track" data-ga_category="grilla" data-ga_action="boton_menu" data-ga_label="grilla" href="http://encuentro.gob.ar/programacion">Grilla</a></li> |
1693 | + <li><a class="ga_encuentro_track" data-ga_category="en_vivo" data-ga_action="boton_menu" data-ga_label="en_vivo" href="http://encuentro.gob.ar/envivo">En vivo</a></li> |
1694 | + <li><a class="ga_encuentro_track" data-ga_category="en_el_aula" data-ga_action="boton_menu" data-ga_label="en_el_aula" href="http://encuentro.gob.ar/enelaula">En el aula</a></li> |
1695 | + <li><a class="ga_encuentro_track" data-ga_category="transmedia" data-ga_action="boton_menu" data-ga_label="transmedia" href="http://encuentro.gob.ar/interactivos">Transmedia</a></li> |
1696 | + <li><a class="ga_encuentro_track" data-ga_category="efemerides" data-ga_action="boton_menu" data-ga_label="efemerides" href="http://encuentro.gob.ar/efemerides">Efemérides</a></li> |
1697 | + </ul> |
1698 | + </nav> |
1699 | + </div> |
1700 | + </div> |
1701 | +</header> |
1702 | + <div id="morphsearch" class="morphsearch hide-from-print" role="banner"> |
1703 | + <span class="morphsearch-close"></span> |
1704 | +<form method="GET" action="http://encuentro.gob.ar/search" accept-charset="UTF-8" class="morphsearch-form"> |
1705 | + <div class="buscar"> |
1706 | + <input class="morphsearch-input" type="search" id="keywords" name="keywords"/> |
1707 | + </div> |
1708 | +</form> |
1709 | + <div class="morphsearch-content"> |
1710 | + <div class="dummy-column"> |
1711 | + <ul class="busqueda" id="busqueda"> |
1712 | + </ul> |
1713 | + </div> |
1714 | + <div class="dummy-column" id="programas"> |
1715 | + </div> |
1716 | + <div class="dummy-column" id="guias"> |
1717 | + </div> |
1718 | + <div class="clr"></div> |
1719 | + <div class="botones-busqueda"> |
1720 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_normal">Buscar en Encuentro</a> </div> |
1721 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_subtitles">Buscar por subtítulos</a> </div> |
1722 | + </div> |
1723 | + </div> |
1724 | + <!-- /morphsearch-content --> |
1725 | +</div> |
1726 | +<!-- /morphsearch --> |
1727 | +<div class="overlay"></div> |
1728 | +<!-- /container --> |
1729 | +<script src="/frontend/js/classie.js"></script> |
1730 | +<script src="/frontend/js/search.js"></script> |
1731 | +<script src="/frontend/js/main.js"></script> |
1732 | + |
1733 | +<script> |
1734 | +$("#search_normal").on('click', function() { |
1735 | + var keywords = $('#keywords').val(); |
1736 | + var req = new XMLHttpRequest(); |
1737 | + var url = "/search/?keywords="+keywords; |
1738 | + window.location.href = url; |
1739 | +}); |
1740 | + |
1741 | +$("#search_subtitles").on('click', function() { |
1742 | + var keywords = $('#keywords').val(); |
1743 | + var req = new XMLHttpRequest(); |
1744 | + var url = "/search/subtitle/?keywords="+keywords; |
1745 | + window.location.href = url; |
1746 | +}); |
1747 | + |
1748 | + |
1749 | +$("#keywords").keyup(function() { |
1750 | + |
1751 | + var keywords = $('#keywords').val(); |
1752 | + |
1753 | + if (keywords.length <= 2) { |
1754 | + return; |
1755 | + } |
1756 | + |
1757 | + var url = '/search/predictive?keywords='+keywords; |
1758 | + |
1759 | + $.getJSON(url, function(results, status) { |
1760 | + if (status == "success") { |
1761 | + $("#programas").html(""); |
1762 | + $("#guias").html(""); |
1763 | + $("#busqueda").html(""); |
1764 | + $("#busqueda").append('<h2>o tal vez estas buscando</h2>'); |
1765 | + for (var i in results.keywords) { |
1766 | + if (i >= 5) |
1767 | + break; |
1768 | + $("#busqueda").append('<li><a href="/search?keywords='+results.keywords[i]+'">'+results.keywords[i]+'<span class="icn icn-ir"></span></a></li>'); |
1769 | + } |
1770 | + |
1771 | + if (results.programs.length == 0) { |
1772 | + $("#programas").append('<h2>No se han encontrado resultados relevantes en <strong>programas</strong></h2>'); |
1773 | + return; |
1774 | + } else { |
1775 | + $("#programas").append('<h2>Resultados relevantes en <strong>programas</strong></h2>'); |
1776 | + } |
1777 | + for (var i in results.programs) { |
1778 | + if (i >= 2) |
1779 | + break; |
1780 | + var image = "/images/placeholder_360x230.jpg"; |
1781 | + if (results.programs[i].image) { |
1782 | + image = '/files/'+results.programs[i].image.file; |
1783 | + } |
1784 | + var title = results.programs[i].title; |
1785 | + $("#programas").append('<a href="/programas/'+results.programs[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado"/></div><div class="text-busqueda"><h5>'+title+'</h5><p>'+results.programs[i].type+'</p></div></dd></a>'); |
1786 | + } |
1787 | + |
1788 | + if (results.resources.length == 0) { |
1789 | + $("#guias").append('<h2>No se han encontrado resultados relevantes en <strong>guías</strong></h2>'); |
1790 | + return; |
1791 | + } else { |
1792 | + $("#guias").append('<h2>Resultados relevantes en <strong>guías</strong></h2>'); |
1793 | + } |
1794 | + for (var i in results.resources) { |
1795 | + var image = "/images/placeholder_360x230.jpg"; |
1796 | + if (results.resources[i].image) { |
1797 | + image = '/files/'+results.resources[i].image.file; |
1798 | + } |
1799 | + $("#guias").append('<a href="/enelaula/'+results.resources[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado" height="230"/></div><div class="text-busqueda"><h5>'+results.resources[i].title+'</h5><p>'+results.resources[i].category.replace(',', '')+'</p></div></dd></a>'); |
1800 | + } |
1801 | + |
1802 | + } else { |
1803 | + alert("Hubo un problema con la llamada a Educ.ar"); |
1804 | + } |
1805 | + }); |
1806 | +}); |
1807 | +</script> <section> |
1808 | + <a name="top-video"></a> |
1809 | + <div id="video-play"> |
1810 | + <div class="container"> |
1811 | + <div class="video-play"> |
1812 | + <div id="player"> |
1813 | + <!-- |
1814 | +<script type="text/javascript" src="http://libs.educ.gov.ar//js/local/player/jwplayer.js"></script> |
1815 | +<div id='programa' class="jwplayer" ></div> |
1816 | +--> |
1817 | + <div style="position: relative; height: 0; padding-top: 56.248%"><iframe id="player_frame" frameborder="0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" allowfullscreen src="http://videos.encuentro.gob.ar/video/?id=132316&cc=0&poster=0&info=0&skin=glow"></iframe></div> |
1818 | +<!-- |
1819 | + <iframe id="player" frameborder="0" allowfullscreen src="http://videos.encuentro.gob.ar/video/?id=132316&cc=0&poster=0&info=0&skin=glow" width="830" height="428"></iframe> |
1820 | +--> |
1821 | + </div> |
1822 | + |
1823 | + <div class="video-desc"> |
1824 | + <div class="col-md-9"> |
1825 | + <main> |
1826 | + <a href="#top-video"><h3 id="program-title"><bold>Susurro y altavoz</bold> / La lluvia (Arnaldo Antunes)</h3></a> |
1827 | + <a href="#" id="btnTemporadas" class="btnTemporadas" style="display:none;">TEMPORADAS</a> |
1828 | + </main> |
1829 | + </div> |
1830 | + <div class="col-md-28"> |
1831 | + <ul class="video-share"> |
1832 | + <li id="open-cc"><span class="icn icn-lista" id="cc-icon"></span></li> |
1833 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_descarga" data-ga_label="La lluvia (Arnaldo Antunes)" id="download" href="http://videos.pakapaka.gob.ar/repositorio/Video/ver?file_id=f2b311a0-cbed-46eb-87c3-7f41dd9060fa&rec_id=132316" download=""><span class="icn icn-descarga"></span></a> </li> |
1834 | + <li> |
1835 | + <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> |
1836 | + <script type="text/javascript">stLight.options({publisher: '9e4d1b956e006dd92bf3cb51daffae49'});</script> |
1837 | + <span class="st_sharethis_custom"><span class="icn icn-compartir"></span></span> |
1838 | + </li> |
1839 | + </ul> |
1840 | + </div> |
1841 | + </div> |
1842 | + </div> |
1843 | + </div> |
1844 | + </div> |
1845 | + |
1846 | +<script> |
1847 | +/*var currentProgramId = 9152; |
1848 | +function vote() |
1849 | +{ |
1850 | + var req = new XMLHttpRequest(); |
1851 | + var url = "/programas/votar/"+currentProgramId+"?email=test@mail.com"; |
1852 | + $.get(url, {}, function(){ }); |
1853 | + $('#votes').text(1); |
1854 | + $('#vote-section').html('Gracias por tu voto.'); |
1855 | +}*/ |
1856 | + |
1857 | + |
1858 | +currentProgramId = 9152; |
1859 | +//); |
1860 | + |
1861 | +/* |
1862 | +$(document).ready(function() { |
1863 | + var time = typeof timeStart !== 'undefined' ? timeStart : 10; |
1864 | + |
1865 | + //jwplayer6 |
1866 | + var config = { |
1867 | + playlist: [{ |
1868 | + //image: videoScreenshotURL + recurso.rec_id + '&t=' + time + '&w=540&h=360', |
1869 | + sources: [ |
1870 | + { |
1871 | + file: "http://repositoriovideo-download.educ.ar/repositorio/Video/ver?file_id=280fa7e6-7e2b-4f0e-907f-5521e6b2c6a5&rec_id=50018", |
1872 | + label: "360p", |
1873 | + type: "mp4", |
1874 | + autostart: false |
1875 | + } |
1876 | + ] |
1877 | + }], |
1878 | + width: '100%', |
1879 | + height: '100%' |
1880 | + }; |
1881 | + |
1882 | + config.playlist[0].tracks = [{ |
1883 | + file: 'http://recursos.pakapaka.gob.ar/repositorio/Download/file?file_id=693e041f-2c70-4e67-8a47-2337f02f2ecb&rec_id=132316', |
1884 | + label: "Español", |
1885 | + kind: "captions", |
1886 | + 'default': false |
1887 | + }]; |
1888 | + |
1889 | + console.log(config); |
1890 | + jwplayer("programa").setup(config); |
1891 | + |
1892 | +// if (typeof timeStart !== 'undefined') { |
1893 | +// jwplayer().seek(timeStart); |
1894 | +// } |
1895 | + |
1896 | + |
1897 | +// jwplayer().onReady(VerPrograma.jwplayerInitConfig); |
1898 | + |
1899 | +}); |
1900 | +*/ |
1901 | + |
1902 | +$( document ).ready(function() { |
1903 | + if($("#season").length > 0){ |
1904 | + $("#btnTemporadas").show(); |
1905 | + } |
1906 | + |
1907 | + $("#btnTemporadas").click(function(e) { |
1908 | + if($("#season").length){ |
1909 | + $('html, body').animate({ |
1910 | + scrollTop: $("#season").offset().top - 200 |
1911 | + }, 500); |
1912 | + } |
1913 | + }); |
1914 | +}); |
1915 | + |
1916 | +</script> <div id="fixed-video"> |
1917 | + <div class="container"> |
1918 | + <div class="container-95"> |
1919 | + <div class="video-desc"> |
1920 | + <a href="#top-video"> |
1921 | + <div class="col-md-9"> |
1922 | + <main> |
1923 | + <a href="#top-video"><h3 id="program-title"><bold>Susurro y altavoz</bold> / La lluvia (Arnaldo Antunes)</h3></a> |
1924 | + </main> |
1925 | + </div> |
1926 | + </a> |
1927 | + <div class="col-md-28"> |
1928 | + <ul class="video-share"> |
1929 | + |
1930 | + <li>><a href="http://videos.pakapaka.gob.ar/repositorio/Video/ver?file_id=fa65d72b-c7ff-48c4-8058-456ae98da3a0&rec_id=132316"><span class="icn icn-descarga"></span></a> </li> |
1931 | + <li> |
1932 | + <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> |
1933 | + <script type="text/javascript">stLight.options({publisher: '9e4d1b956e006dd92bf3cb51daffae49'});</script> |
1934 | + <span class="st_sharethis_custom"><span class="icn icn-compartir"></span></span> |
1935 | + </li> |
1936 | + </ul> |
1937 | + </div> |
1938 | + </div> |
1939 | + </div> |
1940 | + </div> |
1941 | +</div> |
1942 | + |
1943 | + <div class="container"> |
1944 | + <div id="main"> |
1945 | + <div id="horario" class="col-md-2"> |
1946 | + <div class="col-md-13"> |
1947 | + <h5 class="text-uppercase">ahora en encuentro</h5> |
1948 | + <div id="grilla"> |
1949 | + </div> |
1950 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_ver_mas" data-ga_label="grilla completa" href="/programacion/" class="hor-button grilla-button">grilla completa</a> |
1951 | +</div> |
1952 | + |
1953 | + |
1954 | +<script> |
1955 | +/* |
1956 | +var d = new Date(); |
1957 | +var date_from = d.toISOString(); |
1958 | + |
1959 | +var hostname = 'http://apipub-canales.encuentro.gov.ar/1.0/grilla'; |
1960 | +var path = '/'; |
1961 | +var app_key = '8f0d681747a7490d1d2138fd3aa1bfc39209f64a'; |
1962 | +var params = { |
1963 | + app_key: app_key, |
1964 | + canal: "Portal Encuentro", |
1965 | + fecha_inicio: date_from, |
1966 | +} |
1967 | + |
1968 | +var query = encodeURIComponent(JSON.stringify(params)); |
1969 | +//var query = JSON.stringify(params); |
1970 | +var url = hostname + path + query; |
1971 | +*/ |
1972 | + |
1973 | +var url = '/programacion/hoy/'; |
1974 | + |
1975 | +$("#grilla").html('<div class="loader-ajax"></div>'); |
1976 | + |
1977 | +$.getJSON(url, function(dias, status) { |
1978 | + |
1979 | + if (status == "success") { |
1980 | + |
1981 | + if (dias.length == 0) { |
1982 | + $("#grilla").html('No hay programación disponible para este día'); |
1983 | + return; |
1984 | + } |
1985 | + var cant_programas = 1; |
1986 | + |
1987 | + $("#grilla").html(''); |
1988 | + var grid_list = '<ul>'; |
1989 | + |
1990 | + for (var i in dias) { |
1991 | + |
1992 | + for (var j in dias[i]["programas"]) { |
1993 | + |
1994 | + var image = dias[i]["programas"][j].imagen; |
1995 | + var title_original = dias[i]["programas"][j].title; |
1996 | + var title = truncate(title_original, 25, false); |
1997 | + |
1998 | + if (dias[i]["programas"][j].id > -1) |
1999 | + programURL = "/programas/"+dias[i]["programas"][j].id+"/"; |
2000 | + else |
2001 | + programURL = "#"; |
2002 | + |
2003 | + if (cant_programas == 1) { |
2004 | + //grid_list += '<li id="destacado-movil"><a href="'+programURL+'" class="video-pr-ds"><img src="'+image+'" class="img-responsive" alt="'+title_original+'"></a><a href="'+programURL+'"><li class="hora-pr-col"><time class="hora-pr">'+j+'</time><p class="title-pr">'+title+'</p></div></a></li>'; |
2005 | + grid_list += '<li id="destacado-movil"><a class="video-pr-ds ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title_original+'" href="'+programURL+'" ><img src="'+image+'" class="img-responsive" alt="'+title_original+'"></a><a class="ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title_original+'" href="'+programURL+'"></div></a></li>'; |
2006 | + } /*else {*/ |
2007 | + grid_list += '<li class="destacados-horarios"><a class="ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title+'" href="'+programURL+'"><div id="overlay-clasic"><span class="ver-ficha-horario">ver ficha</span> </div><div class="hora-pr-col"><div class="hora-pr">'+j+'</div><div class="title-pr">'+title+'</div></div></a></li>'; |
2008 | + //} |
2009 | + cant_programas++; |
2010 | + |
2011 | + if (cant_programas >= 10) |
2012 | + break; |
2013 | + } |
2014 | + } |
2015 | + grid_list += '</ul>'; |
2016 | + $("#grilla").append(grid_list); |
2017 | + |
2018 | + //trackeo para analytics |
2019 | + $("a.ga_encuentro_track_grid").click(function(e) { |
2020 | + var ga_category = $(e.currentTarget).data('ga_category'); |
2021 | + var ga_action = $(e.currentTarget).data('ga_action'); |
2022 | + var ga_label = $(e.currentTarget).data('ga_label'); |
2023 | + |
2024 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
2025 | + }); |
2026 | + |
2027 | + } else { |
2028 | + console.log("Hubo un problema con la llamada."); |
2029 | + } |
2030 | +}); |
2031 | + |
2032 | +function truncate(str, n, useWordBoundary) { |
2033 | + var singular, tooLong = str.length > n; |
2034 | + useWordBoundary = useWordBoundary || true; |
2035 | + |
2036 | + // Edge case where someone enters a ridiculously long string. |
2037 | + str = tooLong ? str.substr(0, n-1) : str; |
2038 | + |
2039 | + singular = (str.search(/\s/) === -1) ? true : false; |
2040 | + if(!singular) { |
2041 | + str = useWordBoundary && tooLong ? str.substr(0, str.lastIndexOf(' ')) : str; |
2042 | + } |
2043 | + |
2044 | + return tooLong ? str + '…' : str; |
2045 | +} |
2046 | +</script> |
2047 | + |
2048 | + </div> |
2049 | + <div id="central" class="col-md-9"> |
2050 | + <div class="col-em-11" id="loader"> |
2051 | +</div> |
2052 | +<div class="col-em-11" id="cc" style="display: 'none';"> |
2053 | + <h4 class="title-sinopsis">Subtitulos y transcripción</h4> |
2054 | + <div class="col-sub" id="cc-list" style="height: 500px; overflow-y: scroll;"> |
2055 | + </div> |
2056 | +</div> |
2057 | + |
2058 | +<div class="col-em-11" id="sinopsis"><!-- INICIO sinoposis --> |
2059 | + <h4 class="title-sinopsis">Sinopsis</h4> |
2060 | + <div id="sinopsis"> |
2061 | + <div class="col-md-3"> |
2062 | + <img src="/files/6 (3).jpg" class="img-responsive" alt="programas" id="sinopsis_image"> |
2063 | + </div> |
2064 | + <div class="text-sinopsis"> |
2065 | + <p id="sinopsis_text">Un grupo de jóvenes recorre mundos imaginarios de la mano de Ruth Kaufman, escritora y poeta, mientras transita la experiencia de escribir poesía. Sonora, concreta, visual, surrealista, grupal, metafórica, la poesía recorre las calles, llena las paredes y sale de su solemnidad. ¿El móvil? Un poema y su escritor, que comparte la transformadora experiencia de la creación.</p> |
2066 | + <ul class="tags"> |
2067 | + <li><a href="/search/?keywords=poesía">poesía</a></li> |
2068 | + <li><a href="/search/?keywords= taller"> taller</a></li> |
2069 | + <li><a href="/search/?keywords= adolscentes"> adolscentes</a></li> |
2070 | + </ul> |
2071 | + </div> |
2072 | + </div> |
2073 | + |
2074 | + <div class="col-md-3"> |
2075 | + <h4 class="title-sinopsis" id="next_shows_title"></h4> |
2076 | + </div> |
2077 | + <div class="col-md-9"> |
2078 | + <div id="next_shows"></div> |
2079 | + <div id="botones-sinopsis"> |
2080 | + </div> |
2081 | + </div> |
2082 | + <div class="clr"></div> |
2083 | + |
2084 | + |
2085 | + |
2086 | +</div> |
2087 | + |
2088 | +<script src="/frontend/js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script> |
2089 | +<script src="/frontend/js/jquery.featureCarousel.js" type="text/javascript" charset="utf-8"></script> |
2090 | + |
2091 | +<script type="text/javascript"> |
2092 | + |
2093 | +var hostname = 'http://apipub-canales.encuentro.gov.ar/1.0/proximas-emisiones'; |
2094 | +var path = '/'; |
2095 | +var app_key = '8f0d681747a7490d1d2138fd3aa1bfc39209f64a'; |
2096 | +var params = { |
2097 | +app_key: app_key, |
2098 | +canal: "Portal Encuentro" |
2099 | +} |
2100 | + |
2101 | +var query = encodeURIComponent(JSON.stringify(params)); |
2102 | +//var query = JSON.stringify(params); |
2103 | +var url = hostname + path + "132315/" +query; |
2104 | + |
2105 | +$.getJSON(url, function(results, status) { |
2106 | +if (status == "success") { |
2107 | + |
2108 | + if (results) |
2109 | + $("#next_shows_title").html("Próximas</br>emisiones"); |
2110 | + |
2111 | + $.each( results, function( date, emision ) { |
2112 | + var day = date.split("-")[2]; |
2113 | + var month = date.split("-")[1]; |
2114 | + var year = date.split("-")[0]; |
2115 | + $.each( emision.programas, function( time, value ) { |
2116 | + var hour = time.split(":")[0]; |
2117 | + var minute = time.split(":")[1]; |
2118 | + |
2119 | + var title = value.titulo; |
2120 | + |
2121 | + var hourOne = parseInt(hour) + 1; |
2122 | + if (hourOne < 10) hourOne = "0"+hourOne; |
2123 | + var calTime = year+month+day+'T'+hour+minute+'00/'+year+month+day+'T'+hourOne+minute+'00'; |
2124 | + var cal = 'http://www.google.com/calendar/event?action=TEMPLATE&text='+title+'&dates='+calTime+'&details=Canal Encuentro' |
2125 | + var append = '<div class="col-md-13 emisiones-rec"><div id="overlay-clasic"><a href="'+cal+'"><ul><li><span class="icon-plus"></span> </li>agregar a mi calendario</ul></a></div><div class="emision"><p class="dia-em">'+day+'</p>de '+getMonthName(month)+'</div><div class="remember"><time class="dia-hora"><p><strong>'+hour+':'+minute+' hs</strong></p></time><p>'+title+'</p></div><a href="'+cal+'" class="bot-calen mov">agregar a mi calendario</a></div>'; |
2126 | + $("#next_shows").append(append); |
2127 | + }); |
2128 | + }); |
2129 | + |
2130 | +} else { |
2131 | + console.log("Hubo un problema con la llamada."); |
2132 | +} |
2133 | +}); |
2134 | + |
2135 | +function getMonthName(month) |
2136 | +{ |
2137 | + var name = 'Enero'; |
2138 | + switch (month) { |
2139 | + case 2: |
2140 | + name = 'Febrero'; |
2141 | + break; |
2142 | + case 3: |
2143 | + name = 'Marzo'; |
2144 | + break; |
2145 | + case 4: |
2146 | + name = 'Abril'; |
2147 | + break; |
2148 | + case 5: |
2149 | + name = 'Mayo'; |
2150 | + break; |
2151 | + case 6: |
2152 | + name = 'Junio'; |
2153 | + break; |
2154 | + case 7: |
2155 | + name = 'Julio'; |
2156 | + break; |
2157 | + case 8: |
2158 | + name = 'Agosto'; |
2159 | + break; |
2160 | + case 9: |
2161 | + name = 'Septiembre'; |
2162 | + break; |
2163 | + case 10: |
2164 | + name = 'Octubre'; |
2165 | + break; |
2166 | + case 11: |
2167 | + name = 'Noviembre'; |
2168 | + break; |
2169 | + case 12: |
2170 | + name = 'Diciembre'; |
2171 | + break; |
2172 | + } |
2173 | + return name; |
2174 | +} |
2175 | + |
2176 | +$(document).ready(function() { |
2177 | + var carousel = $("#carousel-emis").featureCarousel({ |
2178 | + // include options like this: |
2179 | + // (use quotes only for string values, and no trailing comma after last option) |
2180 | + // option: value, |
2181 | + // option: value |
2182 | + }); |
2183 | + |
2184 | +}); |
2185 | + |
2186 | +$("#loader").hide(); |
2187 | +$("#cc").hide(); |
2188 | + |
2189 | +$('#open-cc').on('click', function() |
2190 | +{ |
2191 | + if ($("#cc").is(":visible")) |
2192 | + { |
2193 | + $("#cc").hide(); |
2194 | + } else { |
2195 | + $('#loader').show(); |
2196 | + $("#loader").html('<div class="loader-ajax"></div>'); |
2197 | + var url = "/programas/srt/"+currentProgramId+"/"; |
2198 | + $.getJSON(url, function(results, status) { |
2199 | + $('#loader').hide(); |
2200 | + if (status == "success") { |
2201 | + var html = ''; |
2202 | + for (var i in results) { |
2203 | + html += '<div class="lineaCC">'; |
2204 | + html += '<div class="col-md-3 hora-subtitles" data-time="'+results[i].startSeconds+'">'+results[i].startTime+'</div>'; |
2205 | + html += '<div class="col-md-9 text-subtitles"><p>'+results[i].text+'</p></div>'; |
2206 | + html += '</div>'; |
2207 | + } |
2208 | + $("#cc-list").html(html); |
2209 | + $("#cc").show(); |
2210 | + } else { |
2211 | + alert("Hubo un problema con la llamada a Educ.ar"); |
2212 | + } |
2213 | + }); |
2214 | + |
2215 | + var iframe = document.getElementById("player"); |
2216 | + //iframe.contentWindow.jwplayer().on('time', playerUpdates); |
2217 | + |
2218 | + |
2219 | + } |
2220 | +}); |
2221 | + |
2222 | +$("#cc").on("click", ".lineaCC", function(e){ |
2223 | + var seekValue = $(".hora-subtitles", this).attr('data-time'); |
2224 | + window.location = "/programas/132316?start="+seekValue; |
2225 | +}); |
2226 | +</script> |
2227 | + <div id="season"> |
2228 | + <div class="temporada" id="menu-control"> |
2229 | + <div class="container-95">Ver capítulos/temporadas</div> |
2230 | + </div> |
2231 | + <div class="container-95" id="season-menu"> |
2232 | + <div class="col-md-28"> |
2233 | + <ul class="nav nav-pills nav-stacked" id="episode"> |
2234 | + <li class="active" id="season-0"><a href="#" class="season-tab" season-id="season-0">Susurro y altavoz</a></li> |
2235 | + </ul> |
2236 | + </div> |
2237 | + <div class="col-md-9"> |
2238 | + <div class="tab-content"> |
2239 | + <div class="tab-pane active" id="season-0-block" season-id="season-0"> |
2240 | + <div class="col-md-13" id="grilla_"> |
2241 | + <div class="col-md-13 grilla-rec"> |
2242 | + <div class="hora-grilla">E <strong>1</strong></div> |
2243 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2244 | + <div class="text-grilla"> |
2245 | + <h4>La lluvia (Arnaldo Antunes)</h4> |
2246 | + </div> |
2247 | + <div class="ver-grilla-table"> |
2248 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="La lluvia (Arnaldo Antunes)" href="#" program-id="9152" season="1">ver episodio</a> |
2249 | + </div> |
2250 | + </div> |
2251 | + <div class="col-md-13 grilla-rec"> |
2252 | + <div class="hora-grilla">E <strong>2</strong></div> |
2253 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2254 | + <div class="text-grilla"> |
2255 | + <h4>Como Gepetto (Roberta Ianamicco)</h4> |
2256 | + </div> |
2257 | + <div class="ver-grilla-table"> |
2258 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="Como Gepetto (Roberta Ianamicco)" href="#" program-id="9153" season="1">ver episodio</a> |
2259 | + </div> |
2260 | + </div> |
2261 | + <div class="col-md-13 grilla-rec"> |
2262 | + <div class="hora-grilla">E <strong>3</strong></div> |
2263 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2264 | + <div class="text-grilla"> |
2265 | + <h4>Me gusta el frío (Rodolfo Edwards)</h4> |
2266 | + </div> |
2267 | + <div class="ver-grilla-table"> |
2268 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="Me gusta el frío (Rodolfo Edwards)" href="#" program-id="9154" season="1">ver episodio</a> |
2269 | + </div> |
2270 | + </div> |
2271 | + <div class="col-md-13 grilla-rec"> |
2272 | + <div class="hora-grilla">E <strong>4</strong></div> |
2273 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2274 | + <div class="text-grilla"> |
2275 | + <h4>El espejo (Sylvia Plath)</h4> |
2276 | + </div> |
2277 | + <div class="ver-grilla-table"> |
2278 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="El espejo (Sylvia Plath)" href="#" program-id="9155" season="1">ver episodio</a> |
2279 | + </div> |
2280 | + </div> |
2281 | + <a href="#" id="btn_ver_mas_1" class="btn_ver_mas_capitulos" data-span_season="span_ver_mas_1">ver mas</a> |
2282 | + <span id="span_ver_mas_1" style="display:none;"/> |
2283 | + <div class="col-md-13 grilla-rec"> |
2284 | + <div class="hora-grilla">E <strong>5</strong></div> |
2285 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2286 | + <div class="text-grilla"> |
2287 | + <h4>Unión libre (André Breton)</h4> |
2288 | + </div> |
2289 | + <div class="ver-grilla-table"> |
2290 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="Unión libre (André Breton)" href="#" program-id="9204" season="1">ver episodio</a> |
2291 | + </div> |
2292 | + </div> |
2293 | + <div class="col-md-13 grilla-rec"> |
2294 | + <div class="hora-grilla">E <strong>6</strong></div> |
2295 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2296 | + <div class="text-grilla"> |
2297 | + <h4>La tinta negra (Edith Vera)</h4> |
2298 | + </div> |
2299 | + <div class="ver-grilla-table"> |
2300 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="La tinta negra (Edith Vera)" href="#" program-id="9235" season="1">ver episodio</a> |
2301 | + </div> |
2302 | + </div> |
2303 | + <div class="col-md-13 grilla-rec"> |
2304 | + <div class="hora-grilla">E <strong>7</strong></div> |
2305 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2306 | + <div class="text-grilla"> |
2307 | + <h4>Gratitud (Oliverio Girondo) </h4> |
2308 | + </div> |
2309 | + <div class="ver-grilla-table"> |
2310 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="Gratitud (Oliverio Girondo) " href="#" program-id="9240" season="1">ver episodio</a> |
2311 | + </div> |
2312 | + </div> |
2313 | + <div class="col-md-13 grilla-rec"> |
2314 | + <div class="hora-grilla">E <strong>8</strong></div> |
2315 | + <div class="img-grilla"><img src="/files/6 (3).jpg" class="img-responsive" alt="aula"></div> |
2316 | + <div class="text-grilla"> |
2317 | + <h4>Cortejo (Cristina Peri Rossi)</h4> |
2318 | + </div> |
2319 | + <div class="ver-grilla-table"> |
2320 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="Cortejo (Cristina Peri Rossi)" href="#" program-id="9244" season="1">ver episodio</a> |
2321 | + </div> |
2322 | + </div> |
2323 | + <a href="#" id="btn_ver_menos_1" class="btn_ver_menos_capitulos" data-span_season="span_ver_mas_1">ver menos</a> |
2324 | + </span> |
2325 | + </div> |
2326 | + </div> |
2327 | + </div> |
2328 | + </div> |
2329 | + </div> |
2330 | +</div> |
2331 | +<div class="clr"></div> |
2332 | + |
2333 | +<script type="text/javascript"> |
2334 | +var selectedSeason = "season-0"; |
2335 | + |
2336 | +$( document ).ready(function() { |
2337 | + |
2338 | + initializeEvents(); |
2339 | + |
2340 | +// $("#season-menu").hide(); |
2341 | +}); |
2342 | + |
2343 | + |
2344 | +function initializeEvents(){ |
2345 | + $('.season-tab').on('click', function() { |
2346 | + var seasonId = $(this).attr("season-id"); |
2347 | + $("#"+selectedSeason).removeClass("active"); |
2348 | + $("#"+selectedSeason+"-block").removeClass("active"); |
2349 | + $("#"+selectedSeason+"-block").addClass("fade"); |
2350 | + $("#"+seasonId).addClass("active"); |
2351 | + $("#"+seasonId+"-block").removeClass("fade"); |
2352 | + $("#"+seasonId+"-block").addClass("active"); |
2353 | + selectedSeason = seasonId; |
2354 | + }); |
2355 | + |
2356 | + $('#episode a').click(function (e) { |
2357 | + e.preventDefault(); |
2358 | + //$(this).tab('show') |
2359 | + }); |
2360 | + |
2361 | + $('.btn_ver_mas_capitulos').click(function (e) { |
2362 | + e.preventDefault(); |
2363 | + var spanSeasonId = $(e.target).data('span_season'); |
2364 | + $("#"+spanSeasonId).show(); |
2365 | + $(this).hide(); |
2366 | + }); |
2367 | + |
2368 | + $('.btn_ver_menos_capitulos').click(function (e) { |
2369 | + e.preventDefault(); |
2370 | + var spanSeasonId = $(e.target).data('span_season'); |
2371 | + $("#"+spanSeasonId).hide(); |
2372 | + var btnVerMasId = spanSeasonId.replace('span','btn'); |
2373 | + $("#"+btnVerMasId).show(); |
2374 | + $('html, body').animate({ |
2375 | + scrollTop: $("#season").offset().top - 200 |
2376 | + }, 500); |
2377 | + }); |
2378 | + |
2379 | + $('#menu-control').on('click', function() |
2380 | + { |
2381 | + if ($("#season-menu").is(":visible")) |
2382 | + { |
2383 | + $("#season-menu").hide(); |
2384 | + $('#menu-control').removeClass("open"); |
2385 | + } else { |
2386 | + $("#season-menu").show(); |
2387 | + $('#menu-control').addClass("open"); |
2388 | + } |
2389 | + }); |
2390 | + |
2391 | + $('.play-episode').on('click', function() |
2392 | + { |
2393 | + var programId = $(this).attr("program-id"); |
2394 | + var season = $(this).attr("season"); |
2395 | + |
2396 | + var url = "/programas/json/" + programId; |
2397 | + |
2398 | + $.getJSON(url, function(results, status) { |
2399 | + for (var i in results) { |
2400 | + var title = "Susurro y altavoz / "+results.title; |
2401 | + var educarId = results.educar_id; |
2402 | + if (results.web_enabled) { |
2403 | + $('#player').html('<div style="position: relative; height: 0; padding-top: 56.248%"><iframe id="player_frame" frameborder="0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" allowfullscreen src="http://videos.encuentro.gob.ar/video/?id='+educarId+'&poster=0&cc=0&info=0&skin=glow"></iframe></div>'); |
2404 | + } else { |
2405 | + //$('#player').html('<div class="video-sin"><div class="overlay-sin-video" id="vote-section"><p>Programa no disponible on-line</p><button id="vote" onClick="vote();">Quiero que vuelva a la pantalla de Encuentro</button><p class="votaron"><strong><span id="votes">'+results.votes+'</span></strong> personas ya votaron</p></div><img src="/images/video-preview.jpg" class="img-responsive" alt="producciones"></div>'); |
2406 | + $('#player').html('<div class="video-sin"><div class="overlay-sin-video" id="vote-section"><p>Programa no disponible on-line</p></div><img src="/images/video-preview.jpg" class="img-responsive" alt="producciones"></div>'); |
2407 | + currentProgramId = results.id; |
2408 | + } |
2409 | + |
2410 | + $('#player').attr('src', 'http://videos.encuentro.gob.ar/video/?id='+educarId+'&poster=0&cc=0&info=0&skin=glow'); |
2411 | + $('#program-title').html(title); |
2412 | + $('#program-duration').html('duración <strong>'+results.duration+' minutos</strong>'); |
2413 | + $('#download').attr('href', results.download_url_sd); |
2414 | + $('#sinopsis_text').html(results.description); |
2415 | + history.pushState({}, title, "/programas/serie/9151/"+programId+'?temporada='+season); |
2416 | + document.title = "Susurro y altavoz (T"+season+"), "+results.title+" - Canal Encuentro"; |
2417 | + |
2418 | + if (results.closed_captions && results.closed_captions.length > 0 ) { |
2419 | + $('#open-cc').show(); |
2420 | + } else { |
2421 | + $('#open-cc').hide(); |
2422 | + } |
2423 | + |
2424 | +// $("#season-menu").hide(); |
2425 | +// $('#menu-control').removeClass("open"); |
2426 | + $("#cc").hide(); |
2427 | + $("#sinopsis").show(); |
2428 | + |
2429 | + currentProgramId = programId; |
2430 | + } |
2431 | + updateRelated(programId); |
2432 | + }) |
2433 | + .done(function() { console.log('getJSON request succeeded!'); }) |
2434 | + .fail(function(jqXHR, textStatus, errorThrown) { |
2435 | + console.log('getJSON request failed! ' + textStatus); |
2436 | + //$("#educar_info").html(""); |
2437 | + //$("#educar_info").append("<pre>Hubo un problema con la llamada</pre>"); |
2438 | + }) |
2439 | + .always(function() { console.log('getJSON request ended!'); }); |
2440 | + }); |
2441 | +} |
2442 | + |
2443 | +function updateRelated(programId) { |
2444 | + var url = '/programas/related/9151/'+programId; |
2445 | + $.getJSON(url, function(results, status) { |
2446 | + $("#related").hide(); |
2447 | + $("#related-list").html(""); |
2448 | + if (status == "success") { |
2449 | + if (results.length > 0) { |
2450 | + $("#related").show(); |
2451 | + for (var i in results) { |
2452 | + var item = '<div class="destacado-hoy" id="ficha">'; |
2453 | + item += '<a href="'+results[i].path+'" class="video-pr-ds">'; |
2454 | + item += '<div id="overlay-clasic"><div class="icon-see"><span class="plus"></span></div></div>'; |
2455 | + item += '<img src="'+results[i].image_path+'" class="img-responsive" alt="recursos relacionados"></a>'; |
2456 | + item += '<div class="tag-recursos">'+results[i].type+'</div>'; |
2457 | + item += '<div class="subtitle-video">'+results[i].title+'</div></div>'; |
2458 | + $("#related-list").append(item); |
2459 | + } |
2460 | + } |
2461 | + } else { |
2462 | + alert("Hubo un problema con la llamada a Educ.ar"); |
2463 | + console.log(status); |
2464 | + } |
2465 | + }) |
2466 | + .done(function() { console.log('getJSON request succeeded!'); }) |
2467 | + .fail(function(jqXHR, textStatus, errorThrown) { |
2468 | + console.log('getJSON request failed! ' + textStatus); |
2469 | + }) |
2470 | + .always(function() { console.log('getJSON request ended!'); }); |
2471 | +} |
2472 | + |
2473 | +</script> </div> |
2474 | + <div id="video" class="col-md-2"> |
2475 | + </div> |
2476 | + </div> |
2477 | + </div> |
2478 | + </section> |
2479 | + </div> |
2480 | + <div id="footer"> |
2481 | + <div class="container pad-40"> |
2482 | + <div class="container-form"> |
2483 | + <div id="foot-m"> |
2484 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Acerca de Encuentro" href="/acercade">Acerca de Encuentro</a> |
2485 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Cableoperadores" href="/cableoperadores">Cableoperadores</a> |
2486 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Presentacion de proyectos" href="/proyectos">Presentación de proyectos</a> |
2487 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Condiciones de uso" href="/condiciones">Condiciones de uso</a> |
2488 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Informacion para proveedores" target="_blank" href="http://www.educ.ar/sitios/educar/compras/index">Información para proveedores</a> |
2489 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Catalogo de programacion" target="_blank" href="http://catalogo.encuentro.gob.ar/">Catálogo de programación</a> |
2490 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Contacto" href="/contacto">Contacto</a> |
2491 | + <p class="subscribe" id="subscribe_message">Quiero recibir novedades </p> |
2492 | + <input class="mail-subs" placeholder="✉" onfocus="this.placeholder = ''" onblur="this.placeholder = '✉'" name="email" type="email" id="emailfield" required /><input type="submit" value="" class="send-subs" title="enviar" id="subscribe"> |
2493 | + <div class="social"> |
2494 | + <p>Seguinos en</p> |
2495 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Facebook" href="http://facebook.com/canalencuentro"><span class="icn icn-facebook"></span></a> |
2496 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Twitter" href="http://twitter.com/canalencuentro"><span class="icn icn-twitter"></span></a> |
2497 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Youtube" href="http://youtube.com/encuentro"><span class="icn icn-utube"></span></a> |
2498 | + </div> |
2499 | + </div> |
2500 | + <p>Todos los derechos reservados educ.ar 2016</p> |
2501 | + </div> |
2502 | + </div> |
2503 | + <div id="footer-logos"> |
2504 | + <div class="container"> |
2505 | + <div class="col-foot"> |
2506 | + <ul> |
2507 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Canal Encuentro" href="http://www.encuentro.gov.ar/"><img src="/frontend/images/footer-encuentro.png" alt="Canal Encuentro"></a></li> |
2508 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Sistema Federal de Medios y Contenidos Publicos" href="https://www.argentina.gob.ar/mediospublicos/"><img src="/frontend/images/footer-secretaria.png" alt="Secretaría Federal de Medios y Contenidos Públicos"></a></li> |
2509 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Educ.ar" href="https://www.educ.ar/"><img src="/frontend/images/footer-educar.png" alt="Educ.ar"></a></li> |
2510 | + </ul> |
2511 | + </div> |
2512 | + </div> |
2513 | + </div> |
2514 | +</div> |
2515 | + |
2516 | +<script> |
2517 | +$("#subscribe").on('click', function() { |
2518 | + var email = $('#emailfield').val(); |
2519 | + if (email.length == 0 || !validateEmail(email)) |
2520 | + { |
2521 | + $("#subscribe_message").html('El email no es válido.'); |
2522 | + return; |
2523 | + } |
2524 | + |
2525 | + var url = "/visitor?email="+email; |
2526 | + |
2527 | + $.getJSON(url, function(results, status) { |
2528 | + if (status == "success") { |
2529 | + $("#subscribe_message").html('Muchas gracias.'); |
2530 | + } else { |
2531 | + alert("Hubo un problema. Por favor intentá más tarde."); |
2532 | + } |
2533 | + }); |
2534 | +}); |
2535 | + |
2536 | +function validateEmail(email) |
2537 | +{ |
2538 | + //var re = /\S+@\S+/; |
2539 | + var re =/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i |
2540 | + return re.test(email); |
2541 | +} |
2542 | +</script> </body> |
2543 | +</html> |
2544 | \ No newline at end of file |
2545 | |
2546 | === added file 'tests/ej-encuen-list-1.html' |
2547 | --- tests/ej-encuen-list-1.html 1970-01-01 00:00:00 +0000 |
2548 | +++ tests/ej-encuen-list-1.html 2017-07-08 22:31:52 +0000 |
2549 | @@ -0,0 +1,846 @@ |
2550 | +<!DOCTYPE html> |
2551 | +<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--> |
2552 | +<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--> |
2553 | +<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--> |
2554 | +<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--> |
2555 | +<!--[if gt IE 9]><!--> |
2556 | +<!--[if lte IE 9]> |
2557 | + <link href='/frontend/css/animations-ie-fix.css' rel='stylesheet'> |
2558 | +<![endif]--> |
2559 | +<html class="no-js" lang="en"> |
2560 | +<!--<![endif]--> |
2561 | +<head> |
2562 | +<meta charset="UTF-8" /> |
2563 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
2564 | +<!-- Twitter Card data --> |
2565 | +<meta name="twitter:site" content="@canalencuentro"> |
2566 | +<meta name="twitter:title" content="Catálogo"> |
2567 | +<!-- Twitter summary card with large image must be at least 280x150px --> |
2568 | +<meta name="twitter:image:src" content="http://encuentro.gob.ar/images/logo-encuentro@2x.png"> |
2569 | + |
2570 | +<!-- Open Graph data --> |
2571 | +<meta property="og:title" content="Catálogo" /> |
2572 | +<meta property="og:type" content="website" /> |
2573 | +<meta property="og:url" content="http://encuentro.gob.ar/programas" /> |
2574 | +<meta property="og:image" content="http://encuentro.gob.ar/images/logo-encuentro@2x.png" /> |
2575 | +<meta property="og:site_name" content="Canal Encuentro" /> |
2576 | +<title>Programas - Canal Encuentro</title> |
2577 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
2578 | +<link href='https://fonts.googleapis.com/css?family=Asap:400,400italic,700,700italic' rel='stylesheet' type='text/css'> |
2579 | +<link rel="stylesheet" type="text/css" href="/frontend/css/encuentro.css" /> |
2580 | +<!-- <link rel="shortcut icon" href="/images/favicon.ico?v=2"> --> |
2581 | +<link rel="shortcut icon" href="/images/favicon.png?v=3"> |
2582 | +<!-- REVOLUTION STYLE SHEETS --> |
2583 | +<link rel="stylesheet" type="text/css" href="/frontend/css/settings.css"> |
2584 | +<!-- REVOLUTION LAYERS STYLES --> |
2585 | +<link rel="stylesheet" type="text/css" href="/frontend/css/layers.css"> |
2586 | +<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
2587 | +<script src="/frontend/js/menu.js"></script> |
2588 | +<script src="/frontend/js/modernizr.min.js"></script> |
2589 | +<script src="/frontend/js/bootstrap.js"></script> |
2590 | + |
2591 | +<!-- REVOLUTION JS FILES --> |
2592 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.tools.min.js"></script> |
2593 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.revolution.min.js"></script> |
2594 | + |
2595 | +<script type="text/javascript"> |
2596 | +<!-- |
2597 | +function viewport() |
2598 | +{ |
2599 | +var e = window |
2600 | +, a = 'inner'; |
2601 | +if ( !( 'innerWidth' in window ) ) |
2602 | +{ |
2603 | +a = 'client'; |
2604 | +e = document.documentElement || document.body; |
2605 | +} |
2606 | +return { width : e[ a+'Width' ] , height : e[ a+'Height' ] } |
2607 | +} |
2608 | +//--> |
2609 | +</script> |
2610 | +<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-1463165-1', 'auto');ga('set', 'anonymizeIp', true);ga('send', 'pageview');</script></head> |
2611 | + |
2612 | +<script> |
2613 | +$( document ).ready(function() { |
2614 | + //trackeo para analytics |
2615 | + $("a.ga_encuentro_track").click(function(e) { |
2616 | + var ga_category = $(e.currentTarget).data('ga_category'); |
2617 | + var ga_action = $(e.currentTarget).data('ga_action'); |
2618 | + var ga_label = $(e.currentTarget).data('ga_label'); |
2619 | + |
2620 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
2621 | + }); |
2622 | +}); |
2623 | + |
2624 | +//hago esta funcion para poder usarla desde otros lugares tambien |
2625 | +function encuentroTrackAnalytics(ga_category, ga_action, ga_label){ |
2626 | + if(typeof dondeEstoy !== 'undefined' && dondeEstoy != null){ |
2627 | + ga_category = dondeEstoy; |
2628 | + } |
2629 | + |
2630 | + ga('send', 'event', ga_category, ga_action, ga_label); |
2631 | +} |
2632 | +</script> <body> |
2633 | + <div id="wrap"> |
2634 | + <header> |
2635 | + <div class="menu"> |
2636 | + <div class="col-xs-2"> |
2637 | + <a href="/"> |
2638 | + <div class="logo"></div> |
2639 | + </a> |
2640 | + </div> |
2641 | + <div class="col-xs-2 section-m">Catálogo</div> |
2642 | + <div class="col-xs-9"> |
2643 | + <div class="search-mov"> |
2644 | + <div class="dropdown"> |
2645 | + <div class="btn btn-default dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" role="button"> |
2646 | + <p class="icon-search"></p> |
2647 | + </div> |
2648 | + <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
2649 | + <li> |
2650 | + <form action="/search/" class="navbar-form"> |
2651 | + <div class="form-group"> |
2652 | + <input type="text" name="keywords" class="form-control" placeholder=""> |
2653 | + </div> |
2654 | + <button type="submit" class="btn btn-default"> |
2655 | + <span class="icon-right-open"></span> |
2656 | + </button> |
2657 | + </form> |
2658 | + </li> |
2659 | + </ul> |
2660 | + </div> |
2661 | + </div> |
2662 | + <div class="menu_bar"> |
2663 | + <a href="#" class="bt-menu"> |
2664 | + </a> |
2665 | + </div> |
2666 | + <nav id="topmenu"> |
2667 | + <ul> |
2668 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="boton_menu" data-ga_label="inicio" href="/">Inicio</a></li> |
2669 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="boton_menu" data-ga_label="catalogo" href="http://encuentro.gob.ar/programas">Catálogo</a></li> |
2670 | + <li><a class="ga_encuentro_track" data-ga_category="grilla" data-ga_action="boton_menu" data-ga_label="grilla" href="http://encuentro.gob.ar/programacion">Grilla</a></li> |
2671 | + <li><a class="ga_encuentro_track" data-ga_category="en_vivo" data-ga_action="boton_menu" data-ga_label="en_vivo" href="http://encuentro.gob.ar/envivo">En vivo</a></li> |
2672 | + <li><a class="ga_encuentro_track" data-ga_category="en_el_aula" data-ga_action="boton_menu" data-ga_label="en_el_aula" href="http://encuentro.gob.ar/enelaula">En el aula</a></li> |
2673 | + <li><a class="ga_encuentro_track" data-ga_category="transmedia" data-ga_action="boton_menu" data-ga_label="transmedia" href="http://encuentro.gob.ar/interactivos">Transmedia</a></li> |
2674 | + <li><a class="ga_encuentro_track" data-ga_category="efemerides" data-ga_action="boton_menu" data-ga_label="efemerides" href="http://encuentro.gob.ar/efemerides">Efemérides</a></li> |
2675 | + </ul> |
2676 | + </nav> |
2677 | + </div> |
2678 | + </div> |
2679 | +</header> |
2680 | + <div id="morphsearch" class="morphsearch hide-from-print" role="banner"> |
2681 | + <span class="morphsearch-close"></span> |
2682 | +<form method="GET" action="http://encuentro.gob.ar/search" accept-charset="UTF-8" class="morphsearch-form"> |
2683 | + <div class="buscar"> |
2684 | + <input class="morphsearch-input" type="search" id="keywords" name="keywords"/> |
2685 | + </div> |
2686 | +</form> |
2687 | + <div class="morphsearch-content"> |
2688 | + <div class="dummy-column"> |
2689 | + <ul class="busqueda" id="busqueda"> |
2690 | + </ul> |
2691 | + </div> |
2692 | + <div class="dummy-column" id="programas"> |
2693 | + </div> |
2694 | + <div class="dummy-column" id="guias"> |
2695 | + </div> |
2696 | + <div class="clr"></div> |
2697 | + <div class="botones-busqueda"> |
2698 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_normal">Buscar en Encuentro</a> </div> |
2699 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_subtitles">Buscar por subtítulos</a> </div> |
2700 | + </div> |
2701 | + </div> |
2702 | + <!-- /morphsearch-content --> |
2703 | +</div> |
2704 | +<!-- /morphsearch --> |
2705 | +<div class="overlay"></div> |
2706 | +<!-- /container --> |
2707 | +<script src="/frontend/js/classie.js"></script> |
2708 | +<script src="/frontend/js/search.js"></script> |
2709 | +<script src="/frontend/js/main.js"></script> |
2710 | + |
2711 | +<script> |
2712 | +$("#search_normal").on('click', function() { |
2713 | + var keywords = $('#keywords').val(); |
2714 | + var req = new XMLHttpRequest(); |
2715 | + var url = "/search/?keywords="+keywords; |
2716 | + window.location.href = url; |
2717 | +}); |
2718 | + |
2719 | +$("#search_subtitles").on('click', function() { |
2720 | + var keywords = $('#keywords').val(); |
2721 | + var req = new XMLHttpRequest(); |
2722 | + var url = "/search/subtitle/?keywords="+keywords; |
2723 | + window.location.href = url; |
2724 | +}); |
2725 | + |
2726 | + |
2727 | +$("#keywords").keyup(function() { |
2728 | + |
2729 | + var keywords = $('#keywords').val(); |
2730 | + |
2731 | + if (keywords.length <= 2) { |
2732 | + return; |
2733 | + } |
2734 | + |
2735 | + var url = '/search/predictive?keywords='+keywords; |
2736 | + |
2737 | + $.getJSON(url, function(results, status) { |
2738 | + if (status == "success") { |
2739 | + $("#programas").html(""); |
2740 | + $("#guias").html(""); |
2741 | + $("#busqueda").html(""); |
2742 | + $("#busqueda").append('<h2>o tal vez estas buscando</h2>'); |
2743 | + for (var i in results.keywords) { |
2744 | + if (i >= 5) |
2745 | + break; |
2746 | + $("#busqueda").append('<li><a href="/search?keywords='+results.keywords[i]+'">'+results.keywords[i]+'<span class="icn icn-ir"></span></a></li>'); |
2747 | + } |
2748 | + |
2749 | + if (results.programs.length == 0) { |
2750 | + $("#programas").append('<h2>No se han encontrado resultados relevantes en <strong>programas</strong></h2>'); |
2751 | + return; |
2752 | + } else { |
2753 | + $("#programas").append('<h2>Resultados relevantes en <strong>programas</strong></h2>'); |
2754 | + } |
2755 | + for (var i in results.programs) { |
2756 | + if (i >= 2) |
2757 | + break; |
2758 | + var image = "/images/placeholder_360x230.jpg"; |
2759 | + if (results.programs[i].image) { |
2760 | + image = '/files/'+results.programs[i].image.file; |
2761 | + } |
2762 | + var title = results.programs[i].title; |
2763 | + $("#programas").append('<a href="/programas/'+results.programs[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado"/></div><div class="text-busqueda"><h5>'+title+'</h5><p>'+results.programs[i].type+'</p></div></dd></a>'); |
2764 | + } |
2765 | + |
2766 | + if (results.resources.length == 0) { |
2767 | + $("#guias").append('<h2>No se han encontrado resultados relevantes en <strong>guías</strong></h2>'); |
2768 | + return; |
2769 | + } else { |
2770 | + $("#guias").append('<h2>Resultados relevantes en <strong>guías</strong></h2>'); |
2771 | + } |
2772 | + for (var i in results.resources) { |
2773 | + var image = "/images/placeholder_360x230.jpg"; |
2774 | + if (results.resources[i].image) { |
2775 | + image = '/files/'+results.resources[i].image.file; |
2776 | + } |
2777 | + $("#guias").append('<a href="/enelaula/'+results.resources[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado" height="230"/></div><div class="text-busqueda"><h5>'+results.resources[i].title+'</h5><p>'+results.resources[i].category.replace(',', '')+'</p></div></dd></a>'); |
2778 | + } |
2779 | + |
2780 | + } else { |
2781 | + alert("Hubo un problema con la llamada a Educ.ar"); |
2782 | + } |
2783 | + }); |
2784 | +}); |
2785 | +</script> <section> |
2786 | + <div class="container"> |
2787 | + <div class="col-filter"> |
2788 | + <div class="col-title-programa"> |
2789 | + <h3>Todos los programas |
2790 | + </h3> |
2791 | + |
2792 | + </div> |
2793 | + <nav id="cbp-hrmenu" class="cbp-hrmenu"> |
2794 | + <ul> |
2795 | + <li> <a href="#">Ordenar por</a> |
2796 | + <div class="cbp-hrsub"><div class="col-filter"> |
2797 | + <div class="cbp-hrsub-inner"> |
2798 | + <div> |
2799 | + <ul id="orden"> |
2800 | + <li class="ordenar"><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="Fecha" href="/programas/?sort=pub_date&category=">Fecha</a></li> |
2801 | + <li class="ordenar"><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="Mas Visto" href="/programas/?sort=views&dir=desc&category=">Más visto</a></li> |
2802 | + <li class="alfabeto"> |
2803 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="A" href="/programas/?keywords=A&category=&sort=title&dir=asc">A</a> |
2804 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="B" href="/programas/?keywords=B&category=&sort=title&dir=asc">B</a> |
2805 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="C" href="/programas/?keywords=C&category=&sort=title&dir=asc">C</a> |
2806 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="D" href="/programas/?keywords=D&category=&sort=title&dir=asc">D</a> |
2807 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="E" href="/programas/?keywords=E&category=&sort=title&dir=asc">E</a> |
2808 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="F" href="/programas/?keywords=F&category=&sort=title&dir=asc">F</a> |
2809 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="G" href="/programas/?keywords=G&category=&sort=title&dir=asc">G</a> |
2810 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="H" href="/programas/?keywords=H&category=&sort=title&dir=asc">H</a> |
2811 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="I" href="/programas/?keywords=I&category=&sort=title&dir=asc">I</a> |
2812 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="J" href="/programas/?keywords=J&category=&sort=title&dir=asc">J</a> |
2813 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="K" href="/programas/?keywords=K&category=&sort=title&dir=asc">K</a> |
2814 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="L" href="/programas/?keywords=L&category=&sort=title&dir=asc">L</a> |
2815 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="M" href="/programas/?keywords=M&category=&sort=title&dir=asc">M</a> |
2816 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="N" href="/programas/?keywords=N&category=&sort=title&dir=asc">N</a> |
2817 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="O" href="/programas/?keywords=O&category=&sort=title&dir=asc">O</a> |
2818 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="P" href="/programas/?keywords=P&category=&sort=title&dir=asc">P</a> |
2819 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="Q" href="/programas/?keywords=Q&category=&sort=title&dir=asc">Q</a> |
2820 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="R" href="/programas/?keywords=R&category=&sort=title&dir=asc">R</a> |
2821 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="S" href="/programas/?keywords=S&category=&sort=title&dir=asc">S</a> |
2822 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="T" href="/programas/?keywords=T&category=&sort=title&dir=asc">T</a> |
2823 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="U" href="/programas/?keywords=U&category=&sort=title&dir=asc">U</a> |
2824 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="V" href="/programas/?keywords=V&category=&sort=title&dir=asc">V</a> |
2825 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="W" href="/programas/?keywords=W&category=&sort=title&dir=asc">W</a> |
2826 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="X" href="/programas/?keywords=X&category=&sort=title&dir=asc">X</a> |
2827 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="Y" href="/programas/?keywords=Y&category=&sort=title&dir=asc">Y</a> |
2828 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ordenar" data-ga_label="Z" href="/programas/?keywords=Z&category=&sort=title&dir=asc">Z</a> |
2829 | + </li> |
2830 | + </ul> |
2831 | + </div> |
2832 | + </div></div> |
2833 | + <!-- /cbp-hrsub-inner --> |
2834 | + </div> |
2835 | + <!-- /cbp-hrsub --> |
2836 | + </li> |
2837 | + <li> <a href="#">Categoria</a> |
2838 | + <div class="cbp-hrsub"><div class="col-filter"> |
2839 | + <div class="cbp-hrsub-inner"> |
2840 | + <div> |
2841 | + <ul id="categoria"> |
2842 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Todos" href="/programas?sort=&keywords=&category=">Todos</a></li> |
2843 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Arte y Cultura" href="/programas?sort=&keywords=&category=Arte+y+Cultura">Arte y Cultura</a></li> |
2844 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Ciencia y Tecnologia" href="/programas?sort=&keywords=&category=Ciencia+y+Tecnología">Ciencia y Tecnología</a></li> |
2845 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Ciencias Sociales" href="/programas?sort=&keywords=&category=Ciencias+Sociales">Ciencias Sociales</a></li> |
2846 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Deporte" href="/programas?sort=&keywords=&category=Deporte">Deporte</a></li> |
2847 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Educacion y Trabajo" href="/programas?sort=&keywords=&category=Educación+y+trabajo">Educación y Trabajo</a></li> |
2848 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Historia" href="/programas?sort=&keywords=&category=Historia">Historia</a></li> |
2849 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Infancia" href="/programas?sort=&keywords=&category=Infancia">Infancia</a></li> |
2850 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Juventud" href="/programas?sort=&keywords=&category=Juventud">Juventud</a></li> |
2851 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_filtrar" data-ga_label="Sociedad" href="/programas?sort=&keywords=&category=Sociedad">Sociedad</a></li> |
2852 | + </ul> |
2853 | + </div> |
2854 | + </div></div> |
2855 | + <!-- /cbp-hrsub-inner --> |
2856 | + </div> |
2857 | + <!-- /cbp-hrsub --> |
2858 | + </li> |
2859 | + </ul> |
2860 | + </nav> |
2861 | +</div> |
2862 | +<script src="/frontend/js/cbpHorizontalMenu.min.js"></script> |
2863 | +<script> |
2864 | +$(function() { |
2865 | + cbpHorizontalMenu.init(); |
2866 | +}); |
2867 | +</script> |
2868 | + <div id="main"> |
2869 | + <div id="horario" class="col-md-2"> |
2870 | + <div class="col-md-13"> |
2871 | + <h5 class="text-uppercase">ahora en encuentro</h5> |
2872 | + <div id="grilla"> |
2873 | + </div> |
2874 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_ver_mas" data-ga_label="grilla completa" href="/programacion/" class="hor-button grilla-button">grilla completa</a> |
2875 | +</div> |
2876 | + |
2877 | + |
2878 | +<script> |
2879 | +/* |
2880 | +var d = new Date(); |
2881 | +var date_from = d.toISOString(); |
2882 | + |
2883 | +var hostname = 'http://apipub-canales.encuentro.gov.ar/1.0/grilla'; |
2884 | +var path = '/'; |
2885 | +var app_key = '8f0d681747a7490d1d2138fd3aa1bfc39209f64a'; |
2886 | +var params = { |
2887 | + app_key: app_key, |
2888 | + canal: "Portal Encuentro", |
2889 | + fecha_inicio: date_from, |
2890 | +} |
2891 | + |
2892 | +var query = encodeURIComponent(JSON.stringify(params)); |
2893 | +//var query = JSON.stringify(params); |
2894 | +var url = hostname + path + query; |
2895 | +*/ |
2896 | + |
2897 | +var url = '/programacion/hoy/'; |
2898 | + |
2899 | +$("#grilla").html('<div class="loader-ajax"></div>'); |
2900 | + |
2901 | +$.getJSON(url, function(dias, status) { |
2902 | + |
2903 | + if (status == "success") { |
2904 | + |
2905 | + if (dias.length == 0) { |
2906 | + $("#grilla").html('No hay programación disponible para este día'); |
2907 | + return; |
2908 | + } |
2909 | + var cant_programas = 1; |
2910 | + |
2911 | + $("#grilla").html(''); |
2912 | + var grid_list = '<ul>'; |
2913 | + |
2914 | + for (var i in dias) { |
2915 | + |
2916 | + for (var j in dias[i]["programas"]) { |
2917 | + |
2918 | + var image = dias[i]["programas"][j].imagen; |
2919 | + var title_original = dias[i]["programas"][j].title; |
2920 | + var title = truncate(title_original, 25, false); |
2921 | + |
2922 | + if (dias[i]["programas"][j].id > -1) |
2923 | + programURL = "/programas/"+dias[i]["programas"][j].id+"/"; |
2924 | + else |
2925 | + programURL = "#"; |
2926 | + |
2927 | + if (cant_programas == 1) { |
2928 | + //grid_list += '<li id="destacado-movil"><a href="'+programURL+'" class="video-pr-ds"><img src="'+image+'" class="img-responsive" alt="'+title_original+'"></a><a href="'+programURL+'"><li class="hora-pr-col"><time class="hora-pr">'+j+'</time><p class="title-pr">'+title+'</p></div></a></li>'; |
2929 | + grid_list += '<li id="destacado-movil"><a class="video-pr-ds ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title_original+'" href="'+programURL+'" ><img src="'+image+'" class="img-responsive" alt="'+title_original+'"></a><a class="ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title_original+'" href="'+programURL+'"></div></a></li>'; |
2930 | + } /*else {*/ |
2931 | + grid_list += '<li class="destacados-horarios"><a class="ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title+'" href="'+programURL+'"><div id="overlay-clasic"><span class="ver-ficha-horario">ver ficha</span> </div><div class="hora-pr-col"><div class="hora-pr">'+j+'</div><div class="title-pr">'+title+'</div></div></a></li>'; |
2932 | + //} |
2933 | + cant_programas++; |
2934 | + |
2935 | + if (cant_programas >= 10) |
2936 | + break; |
2937 | + } |
2938 | + } |
2939 | + grid_list += '</ul>'; |
2940 | + $("#grilla").append(grid_list); |
2941 | + |
2942 | + //trackeo para analytics |
2943 | + $("a.ga_encuentro_track_grid").click(function(e) { |
2944 | + var ga_category = $(e.currentTarget).data('ga_category'); |
2945 | + var ga_action = $(e.currentTarget).data('ga_action'); |
2946 | + var ga_label = $(e.currentTarget).data('ga_label'); |
2947 | + |
2948 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
2949 | + }); |
2950 | + |
2951 | + } else { |
2952 | + console.log("Hubo un problema con la llamada."); |
2953 | + } |
2954 | +}); |
2955 | + |
2956 | +function truncate(str, n, useWordBoundary) { |
2957 | + var singular, tooLong = str.length > n; |
2958 | + useWordBoundary = useWordBoundary || true; |
2959 | + |
2960 | + // Edge case where someone enters a ridiculously long string. |
2961 | + str = tooLong ? str.substr(0, n-1) : str; |
2962 | + |
2963 | + singular = (str.search(/\s/) === -1) ? true : false; |
2964 | + if(!singular) { |
2965 | + str = useWordBoundary && tooLong ? str.substr(0, str.lastIndexOf(' ')) : str; |
2966 | + } |
2967 | + |
2968 | + return tooLong ? str + '…' : str; |
2969 | +} |
2970 | +</script> |
2971 | + |
2972 | + </div> |
2973 | + <div id="central" class="col-md-9"> |
2974 | + <div class="col-md-13"> |
2975 | + <div class="programas"> |
2976 | + <div class="row"> |
2977 | + <div class="col-md-4"> |
2978 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="Susurro y altavoz" href="/programas/serie/9151"> |
2979 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
2980 | + <div class="overlay-view"></div> |
2981 | + <img src="/files/6 (3).jpg" class="img-responsive" alt="Susurro y altavoz"> |
2982 | + <div class="img-info"> |
2983 | + <div class="title-cat-info"> |
2984 | + <ul> |
2985 | + </ul> |
2986 | + </div> |
2987 | + <!-- CATEGORIA programa --> |
2988 | + <div class="title-img-info">Susurro y altavoz</div> |
2989 | + <!-- NOMBRE programa --> |
2990 | + <div class="tags-pr"> |
2991 | + <ul class="tags" id="tags-9151"> |
2992 | + <li>poesía</li> |
2993 | + <li> taller</li> |
2994 | + </ul> |
2995 | + <!-- TAGS programa --> |
2996 | + </div> |
2997 | + </div> |
2998 | + </div> |
2999 | + </a> |
3000 | + <!-- FIN programa --> |
3001 | + </div> |
3002 | + <div class="col-md-4"> |
3003 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="Los visuales" href="/programas/serie/8827"> |
3004 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3005 | + <div class="overlay-view"></div> |
3006 | + <img src="/files/AficheB---360x360 (1).jpg" class="img-responsive" alt="Los visuales"> |
3007 | + <div class="img-info"> |
3008 | + <div class="title-cat-info"> |
3009 | + <ul> |
3010 | + </ul> |
3011 | + </div> |
3012 | + <!-- CATEGORIA programa --> |
3013 | + <div class="title-img-info">Los visuales</div> |
3014 | + <!-- NOMBRE programa --> |
3015 | + <div class="tags-pr"> |
3016 | + <ul class="tags" id="tags-8827"> |
3017 | + <li>arte</li> |
3018 | + <li> arte argentino</li> |
3019 | + </ul> |
3020 | + <!-- TAGS programa --> |
3021 | + </div> |
3022 | + </div> |
3023 | + </div> |
3024 | + </a> |
3025 | + <!-- FIN programa --> |
3026 | + </div> |
3027 | + <div class="col-md-4"> |
3028 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="Monstruos" href="/programas/serie/9156"> |
3029 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3030 | + <div class="overlay-view"></div> |
3031 | + <img src="/files/1 (12).jpg" class="img-responsive" alt="Monstruos"> |
3032 | + <div class="img-info"> |
3033 | + <div class="title-cat-info"> |
3034 | + <ul> |
3035 | + </ul> |
3036 | + </div> |
3037 | + <!-- CATEGORIA programa --> |
3038 | + <div class="title-img-info">Monstruos</div> |
3039 | + <!-- NOMBRE programa --> |
3040 | + <div class="tags-pr"> |
3041 | + <ul class="tags" id="tags-9156"> |
3042 | + <li>teatro</li> |
3043 | + <li> actor</li> |
3044 | + </ul> |
3045 | + <!-- TAGS programa --> |
3046 | + </div> |
3047 | + </div> |
3048 | + </div> |
3049 | + </a> |
3050 | + <!-- FIN programa --> |
3051 | + </div> |
3052 | + |
3053 | + </div> |
3054 | + <div class="row"> |
3055 | + <div class="col-md-4"> |
3056 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="Encuentro en La Cúpula" href="/programas/serie/8925"> |
3057 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3058 | + <div class="overlay-view"></div> |
3059 | + <img src="/files/Afiche---360x360 (8).jpg" class="img-responsive" alt="Encuentro en La Cúpula"> |
3060 | + <div class="img-info"> |
3061 | + <div class="title-cat-info"> |
3062 | + <ul> |
3063 | + </ul> |
3064 | + </div> |
3065 | + <!-- CATEGORIA programa --> |
3066 | + <div class="title-img-info">Encuentro en La Cúpula</div> |
3067 | + <!-- NOMBRE programa --> |
3068 | + <div class="tags-pr"> |
3069 | + <ul class="tags" id="tags-8925"> |
3070 | + <li>música</li> |
3071 | + <li> rock</li> |
3072 | + </ul> |
3073 | + <!-- TAGS programa --> |
3074 | + </div> |
3075 | + </div> |
3076 | + </div> |
3077 | + </a> |
3078 | + <!-- FIN programa --> |
3079 | + </div> |
3080 | + <div class="col-md-4"> |
3081 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="¿Qué piensan los que no piensan como yo?" href="/programas/serie/8822"> |
3082 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3083 | + <div class="overlay-view"></div> |
3084 | + <img src="/files/Afiche---360x360 (1)-2.jpg" class="img-responsive" alt="¿Qué piensan los que no piensan como yo?"> |
3085 | + <div class="img-info"> |
3086 | + <div class="title-cat-info"> |
3087 | + <ul> |
3088 | + </ul> |
3089 | + </div> |
3090 | + <!-- CATEGORIA programa --> |
3091 | + <div class="title-img-info">¿Qué piensan los que no piensan como yo?</div> |
3092 | + <!-- NOMBRE programa --> |
3093 | + <div class="tags-pr"> |
3094 | + <ul class="tags" id="tags-8822"> |
3095 | + <li>debate</li> |
3096 | + <li> sociedad</li> |
3097 | + </ul> |
3098 | + <!-- TAGS programa --> |
3099 | + </div> |
3100 | + </div> |
3101 | + </div> |
3102 | + </a> |
3103 | + <!-- FIN programa --> |
3104 | + </div> |
3105 | + <div class="col-md-4"> |
3106 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="La Colifata en Moscú" href="/programas/9194"> |
3107 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3108 | + <div class="overlay-view"></div> |
3109 | + <img src="/files/Colifata.jpg" class="img-responsive" alt="La Colifata en Moscú"> |
3110 | + <div class="img-info"> |
3111 | + <div class="title-cat-info"> |
3112 | + <ul> |
3113 | + </ul> |
3114 | + </div> |
3115 | + <!-- CATEGORIA programa --> |
3116 | + <div class="title-img-info">La Colifata en Moscú</div> |
3117 | + <!-- NOMBRE programa --> |
3118 | + <div class="tags-pr"> |
3119 | + <ul class="tags" id="tags-9194"> |
3120 | + <li>La Colifata</li> |
3121 | + <li> radio</li> |
3122 | + </ul> |
3123 | + <!-- TAGS programa --> |
3124 | + </div> |
3125 | + </div> |
3126 | + </div> |
3127 | + </a> |
3128 | + <!-- FIN programa --> |
3129 | + </div> |
3130 | + |
3131 | + </div> |
3132 | + <div class="row"> |
3133 | + <div class="col-md-4"> |
3134 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="Dos patrias" href="/programas/serie/9175"> |
3135 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3136 | + <div class="overlay-view"></div> |
3137 | + <img src="/files/4 (9).jpg" class="img-responsive" alt="Dos patrias"> |
3138 | + <div class="img-info"> |
3139 | + <div class="title-cat-info"> |
3140 | + <ul> |
3141 | + </ul> |
3142 | + </div> |
3143 | + <!-- CATEGORIA programa --> |
3144 | + <div class="title-img-info">Dos patrias</div> |
3145 | + <!-- NOMBRE programa --> |
3146 | + <div class="tags-pr"> |
3147 | + <ul class="tags" id="tags-9175"> |
3148 | + <li>historia</li> |
3149 | + <li> biografías</li> |
3150 | + </ul> |
3151 | + <!-- TAGS programa --> |
3152 | + </div> |
3153 | + </div> |
3154 | + </div> |
3155 | + </a> |
3156 | + <!-- FIN programa --> |
3157 | + </div> |
3158 | + <div class="col-md-4"> |
3159 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="Eureka. Desafío de ideas" href="/programas/serie/9039"> |
3160 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3161 | + <div class="overlay-view"></div> |
3162 | + <img src="/files/Programa_360x360 (1).jpg" class="img-responsive" alt="Eureka. Desafío de ideas"> |
3163 | + <div class="img-info"> |
3164 | + <div class="title-cat-info"> |
3165 | + <ul> |
3166 | + </ul> |
3167 | + </div> |
3168 | + <!-- CATEGORIA programa --> |
3169 | + <div class="title-img-info">Eureka. Desafío de ideas</div> |
3170 | + <!-- NOMBRE programa --> |
3171 | + <div class="tags-pr"> |
3172 | + <ul class="tags" id="tags-9039"> |
3173 | + <li>ciencia</li> |
3174 | + <li> salud</li> |
3175 | + </ul> |
3176 | + <!-- TAGS programa --> |
3177 | + </div> |
3178 | + </div> |
3179 | + </div> |
3180 | + </a> |
3181 | + <!-- FIN programa --> |
3182 | + </div> |
3183 | + <div class="col-md-4"> |
3184 | + <a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="link_ver_mas" data-ga_label="En concierto. Música en el CCK" href="/programas/serie/9181"> |
3185 | + <div class="programa-view" style="width:100%;"> <!-- INICIO programa --> |
3186 | + <div class="overlay-view"></div> |
3187 | + <img src="/files/2 (16).jpg" class="img-responsive" alt="En concierto. Música en el CCK"> |
3188 | + <div class="img-info"> |
3189 | + <div class="title-cat-info"> |
3190 | + <ul> |
3191 | + </ul> |
3192 | + </div> |
3193 | + <!-- CATEGORIA programa --> |
3194 | + <div class="title-img-info">En concierto. Música en el CCK</div> |
3195 | + <!-- NOMBRE programa --> |
3196 | + <div class="tags-pr"> |
3197 | + <ul class="tags" id="tags-9181"> |
3198 | + <li>música</li> |
3199 | + <li> rock</li> |
3200 | + </ul> |
3201 | + <!-- TAGS programa --> |
3202 | + </div> |
3203 | + </div> |
3204 | + </div> |
3205 | + </a> |
3206 | + <!-- FIN programa --> |
3207 | + </div> |
3208 | + |
3209 | + </div> |
3210 | + </div> |
3211 | + <div class="clr"></div> |
3212 | + <div class="pagination"> |
3213 | + <ul class="pagination"><li class="disabled"><span>«</span></li> <li class="active"><span>1</span></li><li><a href="http://encuentro.gob.ar/programas?page=2">2</a></li><li><a href="http://encuentro.gob.ar/programas?page=3">3</a></li><li><a href="http://encuentro.gob.ar/programas?page=4">4</a></li><li><a href="http://encuentro.gob.ar/programas?page=5">5</a></li><li><a href="http://encuentro.gob.ar/programas?page=6">6</a></li><li><a href="http://encuentro.gob.ar/programas?page=7">7</a></li><li><a href="http://encuentro.gob.ar/programas?page=8">8</a></li><li class="disabled"><span>...</span></li><li><a href="http://encuentro.gob.ar/programas?page=148">148</a></li><li><a href="http://encuentro.gob.ar/programas?page=149">149</a></li> <li><a href="http://encuentro.gob.ar/programas?page=2" rel="next">»</a></li></ul> |
3214 | + </div> |
3215 | +</div> </div> |
3216 | + <div id="video" class="col-md-2"> |
3217 | + <div class="col-md-13 seccion-v" id="popular"> |
3218 | +</div> |
3219 | + |
3220 | +<script> |
3221 | +var currentViewport = viewport(); |
3222 | +if (currentViewport.width >= 960) { |
3223 | + |
3224 | +var url = '/popular/json'; |
3225 | +$.getJSON(url, function(results, status) { |
3226 | + if (status == "success") { |
3227 | + console.log("FOUND RESULTS" ); |
3228 | + console.log("NUMBER OF RESULTS: " + results.length); |
3229 | + if (results.length > 0) { |
3230 | + $("#popular").html('<h5 class="text-uppercase">Lo más visto</h5>'); |
3231 | + var block = '<ul>'; |
3232 | + for (var i in results) { |
3233 | + var item = '<li class="destacado-hoy">'; |
3234 | + if (results[i].educar_id != null) { |
3235 | + item += '<a class="video-pr-ds ga_encuentro_track_popular" data-ga_category="inicio" data-ga_action="link_mas_visto" data-ga_label="'+results[i].title+'" href="/programas/'+results[i].educar_id+'">'; |
3236 | + } else { |
3237 | + item += '<a class="video-pr-ds">'; |
3238 | + } |
3239 | + item += '<div id="overlay-clasic"><div class="icon-see"><span class="icn icn-ir"></span></div> </div>'; |
3240 | + item += '<img src="'+results[i].image+'" class="img-responsive" alt="'+results[i].title+'"></a>'; |
3241 | + item += '<div class="title-video-pr">'+results[i].title+'</div></li>'; |
3242 | + block += item; |
3243 | + } |
3244 | + block += '</ul>'; |
3245 | + $("#popular").append(block); |
3246 | + |
3247 | + //trackeo para analytics |
3248 | + $("a.ga_encuentro_track_popular").click(function(e) { |
3249 | + var ga_category = $(e.currentTarget).data('ga_category'); |
3250 | + var ga_action = $(e.currentTarget).data('ga_action'); |
3251 | + var ga_label = $(e.currentTarget).data('ga_label'); |
3252 | + |
3253 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
3254 | + }); |
3255 | + |
3256 | + } |
3257 | + } else { |
3258 | + alert("Hubo un problema con la llamada a Educ.ar"); |
3259 | + console.log(status); |
3260 | + } |
3261 | +}) |
3262 | +.done(function() { console.log('getJSON request succeeded!'); }) |
3263 | +.fail(function(jqXHR, textStatus, errorThrown) { |
3264 | + console.log('getJSON request failed! ' + textStatus); |
3265 | +}) |
3266 | +.always(function() { console.log('getJSON request ended!'); }); |
3267 | + |
3268 | +} |
3269 | +</script> <div class="col-md-13 seccion-v" id="newreleases"> |
3270 | +</div> |
3271 | + |
3272 | +<script> |
3273 | +var currentViewport = viewport(); |
3274 | +if (currentViewport.width >= 960) { |
3275 | + |
3276 | +var url = '/new-releases/json'; |
3277 | +$.getJSON(url, function(results, status) { |
3278 | + if (status == "success") { |
3279 | + console.log("FOUND RESULTS" ); |
3280 | + console.log("NUMBER OF RESULTS: " + results.length); |
3281 | + if (results.length > 0) { |
3282 | + $("#newreleases").html('<h5 class="text-uppercase">Estrenos</h5><span class="title-divider"></span>'); |
3283 | + } |
3284 | + for (var i in results) { |
3285 | + var item = '<div id="destacado-hoy" id="ficha">'; |
3286 | + if (results[i].educar_id != null) { |
3287 | + item += '<a class="video-pr-ds ga_encuentro_track_releases" data-ga_category="inicio" data-ga_action="link_estrenos" data-ga_label="'+results[i].title+'" href="/programas/'+results[i].educar_id+'">'; |
3288 | + } else { |
3289 | + item += '<a class="video-pr-ds">'; |
3290 | + } |
3291 | + item += '<div id="overlay-clasic"><div class="icon-see"><span class="icn icn-ir"></span></div></div>'; |
3292 | + item += '<img src="'+results[i].image+'" class="img-responsive" alt="'+results[i].title+'"></a>'; |
3293 | + item += '<div class="subtitle-video">'+results[i].title+'</div>'; |
3294 | + if (results[i].release_time && results[i].release_time.length > 0) |
3295 | + item += '<div class="dia-hora">'+results[i].release_time+'</div>'; |
3296 | + item += '<div class="title-estrenos">'+results[i].description+'</div>'; |
3297 | + $("#newreleases").append(item); |
3298 | + } |
3299 | + $("#newreleases").append('</div>'); |
3300 | + |
3301 | + //trackeo para analytics |
3302 | + $("a.ga_encuentro_track_releases").click(function(e) { |
3303 | + var ga_category = $(e.currentTarget).data('ga_category'); |
3304 | + var ga_action = $(e.currentTarget).data('ga_action'); |
3305 | + var ga_label = $(e.currentTarget).data('ga_label'); |
3306 | + |
3307 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
3308 | + }); |
3309 | + } else { |
3310 | + alert("Hubo un problema con la llamada a Educ.ar"); |
3311 | + console.log(status); |
3312 | + } |
3313 | +}) |
3314 | +.done(function() { console.log('getJSON request succeeded!'); }) |
3315 | +.fail(function(jqXHR, textStatus, errorThrown) { |
3316 | + console.log('getJSON request failed! ' + textStatus); |
3317 | +}) |
3318 | +.always(function() { console.log('getJSON request ended!'); }); |
3319 | + |
3320 | +} |
3321 | + |
3322 | +</script> |
3323 | + </div> |
3324 | + </div> |
3325 | + </div> |
3326 | + </section> |
3327 | + </div> |
3328 | + <div id="footer"> |
3329 | + <div class="container pad-40"> |
3330 | + <div class="container-form"> |
3331 | + <div id="foot-m"> |
3332 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Acerca de Encuentro" href="/acercade">Acerca de Encuentro</a> |
3333 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Cableoperadores" href="/cableoperadores">Cableoperadores</a> |
3334 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Presentacion de proyectos" href="/proyectos">Presentación de proyectos</a> |
3335 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Condiciones de uso" href="/condiciones">Condiciones de uso</a> |
3336 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Informacion para proveedores" target="_blank" href="http://www.educ.ar/sitios/educar/compras/index">Información para proveedores</a> |
3337 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Catalogo de programacion" target="_blank" href="http://catalogo.encuentro.gob.ar/">Catálogo de programación</a> |
3338 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Contacto" href="/contacto">Contacto</a> |
3339 | + <p class="subscribe" id="subscribe_message">Quiero recibir novedades </p> |
3340 | + <input class="mail-subs" placeholder="✉" onfocus="this.placeholder = ''" onblur="this.placeholder = '✉'" name="email" type="email" id="emailfield" required /><input type="submit" value="" class="send-subs" title="enviar" id="subscribe"> |
3341 | + <div class="social"> |
3342 | + <p>Seguinos en</p> |
3343 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Facebook" href="http://facebook.com/canalencuentro"><span class="icn icn-facebook"></span></a> |
3344 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Twitter" href="http://twitter.com/canalencuentro"><span class="icn icn-twitter"></span></a> |
3345 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Youtube" href="http://youtube.com/encuentro"><span class="icn icn-utube"></span></a> |
3346 | + </div> |
3347 | + </div> |
3348 | + <p>Todos los derechos reservados educ.ar 2016</p> |
3349 | + </div> |
3350 | + </div> |
3351 | + <div id="footer-logos"> |
3352 | + <div class="container"> |
3353 | + <div class="col-foot"> |
3354 | + <ul> |
3355 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Canal Encuentro" href="http://www.encuentro.gov.ar/"><img src="/frontend/images/footer-encuentro.png" alt="Canal Encuentro"></a></li> |
3356 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Sistema Federal de Medios y Contenidos Publicos" href="https://www.argentina.gob.ar/mediospublicos/"><img src="/frontend/images/footer-secretaria.png" alt="Secretaría Federal de Medios y Contenidos Públicos"></a></li> |
3357 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Educ.ar" href="https://www.educ.ar/"><img src="/frontend/images/footer-educar.png" alt="Educ.ar"></a></li> |
3358 | + </ul> |
3359 | + </div> |
3360 | + </div> |
3361 | + </div> |
3362 | +</div> |
3363 | + |
3364 | +<script> |
3365 | +$("#subscribe").on('click', function() { |
3366 | + var email = $('#emailfield').val(); |
3367 | + if (email.length == 0 || !validateEmail(email)) |
3368 | + { |
3369 | + $("#subscribe_message").html('El email no es válido.'); |
3370 | + return; |
3371 | + } |
3372 | + |
3373 | + var url = "/visitor?email="+email; |
3374 | + |
3375 | + $.getJSON(url, function(results, status) { |
3376 | + if (status == "success") { |
3377 | + $("#subscribe_message").html('Muchas gracias.'); |
3378 | + } else { |
3379 | + alert("Hubo un problema. Por favor intentá más tarde."); |
3380 | + } |
3381 | + }); |
3382 | +}); |
3383 | + |
3384 | +function validateEmail(email) |
3385 | +{ |
3386 | + //var re = /\S+@\S+/; |
3387 | + var re =/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i |
3388 | + return re.test(email); |
3389 | +} |
3390 | +</script> </body> |
3391 | + |
3392 | + <script> |
3393 | + var dondeEstoy = 'catalogo'; |
3394 | +</script> |
3395 | +</html> |
3396 | \ No newline at end of file |
3397 | |
3398 | === added file 'tests/ej-encuen-program-1.html' |
3399 | --- tests/ej-encuen-program-1.html 1970-01-01 00:00:00 +0000 |
3400 | +++ tests/ej-encuen-program-1.html 2017-07-08 22:31:52 +0000 |
3401 | @@ -0,0 +1,581 @@ |
3402 | +<!DOCTYPE html> |
3403 | +<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--> |
3404 | +<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--> |
3405 | +<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--> |
3406 | +<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--> |
3407 | +<!--[if gt IE 9]><!--> |
3408 | +<!--[if lte IE 9]> |
3409 | + <link href='/frontend/css/animations-ie-fix.css' rel='stylesheet'> |
3410 | +<![endif]--> |
3411 | +<html class="no-js" lang="en"> |
3412 | +<!--<![endif]--> |
3413 | +<head> |
3414 | +<meta charset="UTF-8" /> |
3415 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
3416 | +<!-- Twitter Card data --> |
3417 | +<meta name="twitter:site" content="@canalencuentro"> |
3418 | +<meta name="twitter:title" content="Programa La Colifata en Moscú"> |
3419 | +<!-- Twitter summary card with large image must be at least 280x150px --> |
3420 | +<meta name="twitter:image:src" content="http://encuentro.gob.ar/files/Colifata.jpg"> |
3421 | + |
3422 | +<!-- Open Graph data --> |
3423 | +<meta property="og:title" content="La Colifata en Moscú" /> |
3424 | +<meta property="og:type" content="video" /> |
3425 | +<meta property="og:url" content="http://encuentro.gob.ar/programas/9194" /> |
3426 | +<meta property="og:image" content="http://encuentro.gob.ar/files/Colifata.jpg" /> |
3427 | +<meta property="og:site_name" content="Canal Encuentro" /> |
3428 | +<title>La Colifata en Moscú - Canal Encuentro</title> |
3429 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
3430 | +<link href='https://fonts.googleapis.com/css?family=Asap:400,400italic,700,700italic' rel='stylesheet' type='text/css'> |
3431 | +<link rel="stylesheet" type="text/css" href="/frontend/css/encuentro.css" /> |
3432 | +<!-- <link rel="shortcut icon" href="/images/favicon.ico?v=2"> --> |
3433 | +<link rel="shortcut icon" href="/images/favicon.png?v=3"> |
3434 | +<!-- REVOLUTION STYLE SHEETS --> |
3435 | +<link rel="stylesheet" type="text/css" href="/frontend/css/settings.css"> |
3436 | +<!-- REVOLUTION LAYERS STYLES --> |
3437 | +<link rel="stylesheet" type="text/css" href="/frontend/css/layers.css"> |
3438 | +<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
3439 | +<script src="/frontend/js/menu.js"></script> |
3440 | +<script src="/frontend/js/modernizr.min.js"></script> |
3441 | +<script src="/frontend/js/bootstrap.js"></script> |
3442 | + |
3443 | +<!-- REVOLUTION JS FILES --> |
3444 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.tools.min.js"></script> |
3445 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.revolution.min.js"></script> |
3446 | + |
3447 | +<script type="text/javascript"> |
3448 | +<!-- |
3449 | +function viewport() |
3450 | +{ |
3451 | +var e = window |
3452 | +, a = 'inner'; |
3453 | +if ( !( 'innerWidth' in window ) ) |
3454 | +{ |
3455 | +a = 'client'; |
3456 | +e = document.documentElement || document.body; |
3457 | +} |
3458 | +return { width : e[ a+'Width' ] , height : e[ a+'Height' ] } |
3459 | +} |
3460 | +//--> |
3461 | +</script> |
3462 | +<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-1463165-1', 'auto');ga('set', 'anonymizeIp', true);ga('send', 'pageview');</script></head> |
3463 | + |
3464 | +<script> |
3465 | +$( document ).ready(function() { |
3466 | + //trackeo para analytics |
3467 | + $("a.ga_encuentro_track").click(function(e) { |
3468 | + var ga_category = $(e.currentTarget).data('ga_category'); |
3469 | + var ga_action = $(e.currentTarget).data('ga_action'); |
3470 | + var ga_label = $(e.currentTarget).data('ga_label'); |
3471 | + |
3472 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
3473 | + }); |
3474 | +}); |
3475 | + |
3476 | +//hago esta funcion para poder usarla desde otros lugares tambien |
3477 | +function encuentroTrackAnalytics(ga_category, ga_action, ga_label){ |
3478 | + if(typeof dondeEstoy !== 'undefined' && dondeEstoy != null){ |
3479 | + ga_category = dondeEstoy; |
3480 | + } |
3481 | + |
3482 | + ga('send', 'event', ga_category, ga_action, ga_label); |
3483 | +} |
3484 | +</script> <body> |
3485 | + <div id="wrap"> |
3486 | + <header> |
3487 | + <div class="menu"> |
3488 | + <div class="col-xs-2"> |
3489 | + <a href="/"> |
3490 | + <div class="logo"></div> |
3491 | + </a> |
3492 | + </div> |
3493 | + <div class="col-xs-2 section-m">Catálogo</div> |
3494 | + <div class="col-xs-9"> |
3495 | + <div class="search-mov"> |
3496 | + <div class="dropdown"> |
3497 | + <div class="btn btn-default dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" role="button"> |
3498 | + <p class="icon-search"></p> |
3499 | + </div> |
3500 | + <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
3501 | + <li> |
3502 | + <form action="/search/" class="navbar-form"> |
3503 | + <div class="form-group"> |
3504 | + <input type="text" name="keywords" class="form-control" placeholder=""> |
3505 | + </div> |
3506 | + <button type="submit" class="btn btn-default"> |
3507 | + <span class="icon-right-open"></span> |
3508 | + </button> |
3509 | + </form> |
3510 | + </li> |
3511 | + </ul> |
3512 | + </div> |
3513 | + </div> |
3514 | + <div class="menu_bar"> |
3515 | + <a href="#" class="bt-menu"> |
3516 | + </a> |
3517 | + </div> |
3518 | + <nav id="topmenu"> |
3519 | + <ul> |
3520 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="boton_menu" data-ga_label="inicio" href="/">Inicio</a></li> |
3521 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="boton_menu" data-ga_label="catalogo" href="http://encuentro.gob.ar/programas">Catálogo</a></li> |
3522 | + <li><a class="ga_encuentro_track" data-ga_category="grilla" data-ga_action="boton_menu" data-ga_label="grilla" href="http://encuentro.gob.ar/programacion">Grilla</a></li> |
3523 | + <li><a class="ga_encuentro_track" data-ga_category="en_vivo" data-ga_action="boton_menu" data-ga_label="en_vivo" href="http://encuentro.gob.ar/envivo">En vivo</a></li> |
3524 | + <li><a class="ga_encuentro_track" data-ga_category="en_el_aula" data-ga_action="boton_menu" data-ga_label="en_el_aula" href="http://encuentro.gob.ar/enelaula">En el aula</a></li> |
3525 | + <li><a class="ga_encuentro_track" data-ga_category="transmedia" data-ga_action="boton_menu" data-ga_label="transmedia" href="http://encuentro.gob.ar/interactivos">Transmedia</a></li> |
3526 | + <li><a class="ga_encuentro_track" data-ga_category="efemerides" data-ga_action="boton_menu" data-ga_label="efemerides" href="http://encuentro.gob.ar/efemerides">Efemérides</a></li> |
3527 | + </ul> |
3528 | + </nav> |
3529 | + </div> |
3530 | + </div> |
3531 | +</header> |
3532 | + <div id="morphsearch" class="morphsearch hide-from-print" role="banner"> |
3533 | + <span class="morphsearch-close"></span> |
3534 | +<form method="GET" action="http://encuentro.gob.ar/search" accept-charset="UTF-8" class="morphsearch-form"> |
3535 | + <div class="buscar"> |
3536 | + <input class="morphsearch-input" type="search" id="keywords" name="keywords"/> |
3537 | + </div> |
3538 | +</form> |
3539 | + <div class="morphsearch-content"> |
3540 | + <div class="dummy-column"> |
3541 | + <ul class="busqueda" id="busqueda"> |
3542 | + </ul> |
3543 | + </div> |
3544 | + <div class="dummy-column" id="programas"> |
3545 | + </div> |
3546 | + <div class="dummy-column" id="guias"> |
3547 | + </div> |
3548 | + <div class="clr"></div> |
3549 | + <div class="botones-busqueda"> |
3550 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_normal">Buscar en Encuentro</a> </div> |
3551 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_subtitles">Buscar por subtítulos</a> </div> |
3552 | + </div> |
3553 | + </div> |
3554 | + <!-- /morphsearch-content --> |
3555 | +</div> |
3556 | +<!-- /morphsearch --> |
3557 | +<div class="overlay"></div> |
3558 | +<!-- /container --> |
3559 | +<script src="/frontend/js/classie.js"></script> |
3560 | +<script src="/frontend/js/search.js"></script> |
3561 | +<script src="/frontend/js/main.js"></script> |
3562 | + |
3563 | +<script> |
3564 | +$("#search_normal").on('click', function() { |
3565 | + var keywords = $('#keywords').val(); |
3566 | + var req = new XMLHttpRequest(); |
3567 | + var url = "/search/?keywords="+keywords; |
3568 | + window.location.href = url; |
3569 | +}); |
3570 | + |
3571 | +$("#search_subtitles").on('click', function() { |
3572 | + var keywords = $('#keywords').val(); |
3573 | + var req = new XMLHttpRequest(); |
3574 | + var url = "/search/subtitle/?keywords="+keywords; |
3575 | + window.location.href = url; |
3576 | +}); |
3577 | + |
3578 | + |
3579 | +$("#keywords").keyup(function() { |
3580 | + |
3581 | + var keywords = $('#keywords').val(); |
3582 | + |
3583 | + if (keywords.length <= 2) { |
3584 | + return; |
3585 | + } |
3586 | + |
3587 | + var url = '/search/predictive?keywords='+keywords; |
3588 | + |
3589 | + $.getJSON(url, function(results, status) { |
3590 | + if (status == "success") { |
3591 | + $("#programas").html(""); |
3592 | + $("#guias").html(""); |
3593 | + $("#busqueda").html(""); |
3594 | + $("#busqueda").append('<h2>o tal vez estas buscando</h2>'); |
3595 | + for (var i in results.keywords) { |
3596 | + if (i >= 5) |
3597 | + break; |
3598 | + $("#busqueda").append('<li><a href="/search?keywords='+results.keywords[i]+'">'+results.keywords[i]+'<span class="icn icn-ir"></span></a></li>'); |
3599 | + } |
3600 | + |
3601 | + if (results.programs.length == 0) { |
3602 | + $("#programas").append('<h2>No se han encontrado resultados relevantes en <strong>programas</strong></h2>'); |
3603 | + return; |
3604 | + } else { |
3605 | + $("#programas").append('<h2>Resultados relevantes en <strong>programas</strong></h2>'); |
3606 | + } |
3607 | + for (var i in results.programs) { |
3608 | + if (i >= 2) |
3609 | + break; |
3610 | + var image = "/images/placeholder_360x230.jpg"; |
3611 | + if (results.programs[i].image) { |
3612 | + image = '/files/'+results.programs[i].image.file; |
3613 | + } |
3614 | + var title = results.programs[i].title; |
3615 | + $("#programas").append('<a href="/programas/'+results.programs[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado"/></div><div class="text-busqueda"><h5>'+title+'</h5><p>'+results.programs[i].type+'</p></div></dd></a>'); |
3616 | + } |
3617 | + |
3618 | + if (results.resources.length == 0) { |
3619 | + $("#guias").append('<h2>No se han encontrado resultados relevantes en <strong>guías</strong></h2>'); |
3620 | + return; |
3621 | + } else { |
3622 | + $("#guias").append('<h2>Resultados relevantes en <strong>guías</strong></h2>'); |
3623 | + } |
3624 | + for (var i in results.resources) { |
3625 | + var image = "/images/placeholder_360x230.jpg"; |
3626 | + if (results.resources[i].image) { |
3627 | + image = '/files/'+results.resources[i].image.file; |
3628 | + } |
3629 | + $("#guias").append('<a href="/enelaula/'+results.resources[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado" height="230"/></div><div class="text-busqueda"><h5>'+results.resources[i].title+'</h5><p>'+results.resources[i].category.replace(',', '')+'</p></div></dd></a>'); |
3630 | + } |
3631 | + |
3632 | + } else { |
3633 | + alert("Hubo un problema con la llamada a Educ.ar"); |
3634 | + } |
3635 | + }); |
3636 | +}); |
3637 | +</script> <section> |
3638 | + <a name="top-video"></a> |
3639 | + <div id="video-play"> |
3640 | + <div class="container"> |
3641 | + <div class="video-play"> |
3642 | + <div id="player"> |
3643 | + <!-- |
3644 | +<script type="text/javascript" src="http://libs.educ.gov.ar//js/local/player/jwplayer.js"></script> |
3645 | +<div id='programa' class="jwplayer" ></div> |
3646 | +--> |
3647 | + <div style="position: relative; height: 0; padding-top: 56.248%"><iframe id="player_frame" frameborder="0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" allowfullscreen src="http://videos.encuentro.gob.ar/video/?id=132350&cc=0&poster=0&info=0&skin=glow"></iframe></div> |
3648 | +<!-- |
3649 | + <iframe id="player" frameborder="0" allowfullscreen src="http://videos.encuentro.gob.ar/video/?id=132350&cc=0&poster=0&info=0&skin=glow" width="830" height="428"></iframe> |
3650 | +--> |
3651 | + </div> |
3652 | + |
3653 | + <div class="video-desc"> |
3654 | + <div class="col-md-9"> |
3655 | + <main> |
3656 | + <a href="#top-video"><h3 id="program-title">La Colifata en Moscú</h3></a> |
3657 | + <a href="#" id="btnTemporadas" class="btnTemporadas" style="display:none;">TEMPORADAS</a> |
3658 | + </main> |
3659 | + </div> |
3660 | + <div class="col-md-28"> |
3661 | + <ul class="video-share"> |
3662 | + <li id="open-cc"><span class="icn icn-lista" id="cc-icon"></span></li> |
3663 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_descarga" data-ga_label="La Colifata en Moscú" id="download" href="http://videos.pakapaka.gob.ar/repositorio/Video/ver?file_id=8fa03691-e0c9-4ca3-8401-8b564ff98d77&rec_id=132350" download=""><span class="icn icn-descarga"></span></a> </li> |
3664 | + <li> |
3665 | + <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> |
3666 | + <script type="text/javascript">stLight.options({publisher: '9e4d1b956e006dd92bf3cb51daffae49'});</script> |
3667 | + <span class="st_sharethis_custom"><span class="icn icn-compartir"></span></span> |
3668 | + </li> |
3669 | + </ul> |
3670 | + </div> |
3671 | + </div> |
3672 | + </div> |
3673 | + </div> |
3674 | + </div> |
3675 | + |
3676 | +<script> |
3677 | +/*var currentProgramId = 9194; |
3678 | +function vote() |
3679 | +{ |
3680 | + var req = new XMLHttpRequest(); |
3681 | + var url = "/programas/votar/"+currentProgramId+"?email=test@mail.com"; |
3682 | + $.get(url, {}, function(){ }); |
3683 | + $('#votes').text(1); |
3684 | + $('#vote-section').html('Gracias por tu voto.'); |
3685 | +}*/ |
3686 | + |
3687 | + $('#open-cc').hide(); |
3688 | + |
3689 | +currentProgramId = 9194; |
3690 | +//); |
3691 | + |
3692 | +/* |
3693 | +$(document).ready(function() { |
3694 | + var time = typeof timeStart !== 'undefined' ? timeStart : 10; |
3695 | + |
3696 | + //jwplayer6 |
3697 | + var config = { |
3698 | + playlist: [{ |
3699 | + //image: videoScreenshotURL + recurso.rec_id + '&t=' + time + '&w=540&h=360', |
3700 | + sources: [ |
3701 | + { |
3702 | + file: "http://repositoriovideo-download.educ.ar/repositorio/Video/ver?file_id=280fa7e6-7e2b-4f0e-907f-5521e6b2c6a5&rec_id=50018", |
3703 | + label: "360p", |
3704 | + type: "mp4", |
3705 | + autostart: false |
3706 | + } |
3707 | + ] |
3708 | + }], |
3709 | + width: '100%', |
3710 | + height: '100%' |
3711 | + }; |
3712 | + |
3713 | + |
3714 | + console.log(config); |
3715 | + jwplayer("programa").setup(config); |
3716 | + |
3717 | +// if (typeof timeStart !== 'undefined') { |
3718 | +// jwplayer().seek(timeStart); |
3719 | +// } |
3720 | + |
3721 | + |
3722 | +// jwplayer().onReady(VerPrograma.jwplayerInitConfig); |
3723 | + |
3724 | +}); |
3725 | +*/ |
3726 | + |
3727 | +$( document ).ready(function() { |
3728 | + if($("#season").length > 0){ |
3729 | + $("#btnTemporadas").show(); |
3730 | + } |
3731 | + |
3732 | + $("#btnTemporadas").click(function(e) { |
3733 | + if($("#season").length){ |
3734 | + $('html, body').animate({ |
3735 | + scrollTop: $("#season").offset().top - 200 |
3736 | + }, 500); |
3737 | + } |
3738 | + }); |
3739 | +}); |
3740 | + |
3741 | +</script> <div id="fixed-video"> |
3742 | + <div class="container"> |
3743 | + <div class="container-95"> |
3744 | + <div class="video-desc"> |
3745 | + <a href="#top-video"> |
3746 | + <div class="col-md-9"> |
3747 | + <main> |
3748 | + <a href="#top-video"><h3 id="program-title">La Colifata en Moscú</h3></a> |
3749 | + </main> |
3750 | + </div> |
3751 | + </a> |
3752 | + <div class="col-md-28"> |
3753 | + <ul class="video-share"> |
3754 | + |
3755 | + <li>><a href="http://videos.pakapaka.gob.ar/repositorio/Video/ver?file_id=f19e7d21-8290-44e0-8e33-34e703d416fd&rec_id=132350"><span class="icn icn-descarga"></span></a> </li> |
3756 | + <li> |
3757 | + <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> |
3758 | + <script type="text/javascript">stLight.options({publisher: '9e4d1b956e006dd92bf3cb51daffae49'});</script> |
3759 | + <span class="st_sharethis_custom"><span class="icn icn-compartir"></span></span> |
3760 | + </li> |
3761 | + </ul> |
3762 | + </div> |
3763 | + </div> |
3764 | + </div> |
3765 | + </div> |
3766 | +</div> |
3767 | + |
3768 | + <div class="container"> |
3769 | + <div id="main"> |
3770 | + <div id="horario" class="col-md-2"> |
3771 | + </div> |
3772 | + <div id="central" class="col-md-9"> |
3773 | + <div class="col-em-11" id="sinopsis"><!-- INICIO sinoposis --> |
3774 | + <h4 class="title-sinopsis">Sinopsis</h4> |
3775 | + <div id="sinopsis"> |
3776 | + <div class="col-md-3"> |
3777 | + <img src="/files/Colifata.jpg" class="img-responsive" alt="programas"> |
3778 | + </div> |
3779 | + <div class="text-sinopsis"> |
3780 | + <p>La participación de La Colifata -la radio de los internos y exinternos del hospital Borda- en el festival de arte y salud mental El Hilo de Ariadna (en la capital de Rusia) nos lleva como testigos de un encuentro único de esta red mundial de radios. Un especial sobre ese viaje terapéutico en el que Diego Oliveri (exinterno del hospital Borda y miembro activo de la radio La Colifata), Alfredo Olivera (creador y corazón del proyecto) y Lalo Mir (padrino de la radio) recorren Moscú derribando muros. </p> |
3781 | + <ul class="tags"> |
3782 | + <li><a href="/search/?keywords=La Colifata">La Colifata</a></li> |
3783 | + <li><a href="/search/?keywords= radio"> radio</a></li> |
3784 | + <li><a href="/search/?keywords= Hospital Borda"> Hospital Borda</a></li> |
3785 | + <li><a href="/search/?keywords= salud mental"> salud mental</a></li> |
3786 | + </ul> |
3787 | + </div> |
3788 | + </div> |
3789 | + <div class="col-md-3"> |
3790 | + <h4 class="title-sinopsis" id="next_shows_title"></h4> |
3791 | + </div> |
3792 | + <div class="col-md-9"> |
3793 | + <div id="next_shows"></div> |
3794 | + |
3795 | + |
3796 | + <div id="botones-sinopsis"> |
3797 | + </div> |
3798 | + |
3799 | + </div> |
3800 | + |
3801 | + <div class="clr"></div> |
3802 | + |
3803 | + |
3804 | + |
3805 | +</div> |
3806 | + |
3807 | +<script src="/frontend/js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script> |
3808 | +<script src="/frontend/js/jquery.featureCarousel.js" type="text/javascript" charset="utf-8"></script> |
3809 | + |
3810 | +<script type="text/javascript"> |
3811 | + |
3812 | +var hostname = 'http://apipub-canales.encuentro.gov.ar/1.0/proximas-emisiones'; |
3813 | +var path = '/'; |
3814 | +var app_key = '8f0d681747a7490d1d2138fd3aa1bfc39209f64a'; |
3815 | +var params = { |
3816 | +app_key: app_key, |
3817 | +canal: "Portal Encuentro" |
3818 | +} |
3819 | + |
3820 | +var query = encodeURIComponent(JSON.stringify(params)); |
3821 | +var url = hostname + path + "132350/" +query; |
3822 | + |
3823 | +$.getJSON(url, function(results, status) { |
3824 | +if (status == "success") { |
3825 | + if (results) |
3826 | + $("#next_shows_title").html("Próximas</br>emisiones"); |
3827 | + |
3828 | + $.each( results, function( date, emision ) { |
3829 | + var day = date.split("-")[2]; |
3830 | + var month = date.split("-")[1]; |
3831 | + var year = date.split("-")[0]; |
3832 | + $.each( emision.programas, function( time, value ) { |
3833 | + var hour = time.split(":")[0]; |
3834 | + var minute = time.split(":")[1]; |
3835 | + |
3836 | + var title = value.titulo; |
3837 | + |
3838 | + var hourOne = parseInt(hour) + 1; |
3839 | + if (hourOne < 10) hourOne = "0"+hourOne; |
3840 | + var calTime = year+month+day+'T'+hour+minute+'00/'+year+month+day+'T'+hourOne+minute+'00'; |
3841 | + var cal = 'http://www.google.com/calendar/event?action=TEMPLATE&text='+title+'&dates='+calTime+'&details=Canal Encuentro' |
3842 | + var append = '<div class="col-md-13 emisiones-rec"><div id="overlay-clasic"><a href="'+cal+'"><ul><li><span class="icon-plus"></span> </li>agregar a mi calendario</ul></a></div><div class="emision"><p class="dia-em">'+day+'</p>de '+getMonthName(month)+'</div><div class="remember"><time class="dia-hora"><p><strong>'+hour+':'+minute+' hs</strong></p></time><p>'+title+'</p></div><a href="'+cal+'" class="bot-calen mov">agregar a mi calendario</a></div>'; |
3843 | + $("#next_shows").append(append); |
3844 | + }); |
3845 | + }); |
3846 | + |
3847 | +} else { |
3848 | + console.log("Hubo un problema con la llamada."); |
3849 | +} |
3850 | +}); |
3851 | + |
3852 | +function getMonthName(month) |
3853 | +{ |
3854 | + var name = 'Enero'; |
3855 | + switch (month) { |
3856 | + case 2: |
3857 | + name = 'Febrero'; |
3858 | + break; |
3859 | + case 3: |
3860 | + name = 'Marzo'; |
3861 | + break; |
3862 | + case 4: |
3863 | + name = 'Abril'; |
3864 | + break; |
3865 | + case 5: |
3866 | + name = 'Mayo'; |
3867 | + break; |
3868 | + case 6: |
3869 | + name = 'Junio'; |
3870 | + break; |
3871 | + case 7: |
3872 | + name = 'Julio'; |
3873 | + break; |
3874 | + case 8: |
3875 | + name = 'Agosto'; |
3876 | + break; |
3877 | + case 9: |
3878 | + name = 'Septiembre'; |
3879 | + break; |
3880 | + case 10: |
3881 | + name = 'Octubre'; |
3882 | + break; |
3883 | + case 11: |
3884 | + name = 'Noviembre'; |
3885 | + break; |
3886 | + case 12: |
3887 | + name = 'Diciembre'; |
3888 | + break; |
3889 | + } |
3890 | + return name; |
3891 | +} |
3892 | + |
3893 | + |
3894 | +$(document).ready(function() { |
3895 | + var carousel = $("#carousel-emis").featureCarousel({ |
3896 | + // include options like this: |
3897 | + // (use quotes only for string values, and no trailing comma after last option) |
3898 | + // option: value, |
3899 | + // option: value |
3900 | + }); |
3901 | + |
3902 | + |
3903 | + $("#cc").on("click", ".lineaCC", function(e){ |
3904 | + var seekValue = $(".hora-subtitles", this).attr('data-time'); |
3905 | + window.location = "/programas/132350?start="+seekValue; |
3906 | + }); |
3907 | + |
3908 | +}); |
3909 | + |
3910 | + |
3911 | +</script> |
3912 | + </div> |
3913 | + <div id="video" class="col-md-2"> |
3914 | + </div> |
3915 | + </div> |
3916 | + </div> |
3917 | + </section> |
3918 | + </div> |
3919 | + <div id="footer"> |
3920 | + <div class="container pad-40"> |
3921 | + <div class="container-form"> |
3922 | + <div id="foot-m"> |
3923 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Acerca de Encuentro" href="/acercade">Acerca de Encuentro</a> |
3924 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Cableoperadores" href="/cableoperadores">Cableoperadores</a> |
3925 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Presentacion de proyectos" href="/proyectos">Presentación de proyectos</a> |
3926 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Condiciones de uso" href="/condiciones">Condiciones de uso</a> |
3927 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Informacion para proveedores" target="_blank" href="http://www.educ.ar/sitios/educar/compras/index">Información para proveedores</a> |
3928 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Catalogo de programacion" target="_blank" href="http://catalogo.encuentro.gob.ar/">Catálogo de programación</a> |
3929 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Contacto" href="/contacto">Contacto</a> |
3930 | + <p class="subscribe" id="subscribe_message">Quiero recibir novedades </p> |
3931 | + <input class="mail-subs" placeholder="✉" onfocus="this.placeholder = ''" onblur="this.placeholder = '✉'" name="email" type="email" id="emailfield" required /><input type="submit" value="" class="send-subs" title="enviar" id="subscribe"> |
3932 | + <div class="social"> |
3933 | + <p>Seguinos en</p> |
3934 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Facebook" href="http://facebook.com/canalencuentro"><span class="icn icn-facebook"></span></a> |
3935 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Twitter" href="http://twitter.com/canalencuentro"><span class="icn icn-twitter"></span></a> |
3936 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Youtube" href="http://youtube.com/encuentro"><span class="icn icn-utube"></span></a> |
3937 | + </div> |
3938 | + </div> |
3939 | + <p>Todos los derechos reservados educ.ar 2016</p> |
3940 | + </div> |
3941 | + </div> |
3942 | + <div id="footer-logos"> |
3943 | + <div class="container"> |
3944 | + <div class="col-foot"> |
3945 | + <ul> |
3946 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Canal Encuentro" href="http://www.encuentro.gov.ar/"><img src="/frontend/images/footer-encuentro.png" alt="Canal Encuentro"></a></li> |
3947 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Sistema Federal de Medios y Contenidos Publicos" href="https://www.argentina.gob.ar/mediospublicos/"><img src="/frontend/images/footer-secretaria.png" alt="Secretaría Federal de Medios y Contenidos Públicos"></a></li> |
3948 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Educ.ar" href="https://www.educ.ar/"><img src="/frontend/images/footer-educar.png" alt="Educ.ar"></a></li> |
3949 | + </ul> |
3950 | + </div> |
3951 | + </div> |
3952 | + </div> |
3953 | +</div> |
3954 | + |
3955 | +<script> |
3956 | +$("#subscribe").on('click', function() { |
3957 | + var email = $('#emailfield').val(); |
3958 | + if (email.length == 0 || !validateEmail(email)) |
3959 | + { |
3960 | + $("#subscribe_message").html('El email no es válido.'); |
3961 | + return; |
3962 | + } |
3963 | + |
3964 | + var url = "/visitor?email="+email; |
3965 | + |
3966 | + $.getJSON(url, function(results, status) { |
3967 | + if (status == "success") { |
3968 | + $("#subscribe_message").html('Muchas gracias.'); |
3969 | + } else { |
3970 | + alert("Hubo un problema. Por favor intentá más tarde."); |
3971 | + } |
3972 | + }); |
3973 | +}); |
3974 | + |
3975 | +function validateEmail(email) |
3976 | +{ |
3977 | + //var re = /\S+@\S+/; |
3978 | + var re =/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i |
3979 | + return re.test(email); |
3980 | +} |
3981 | +</script> </body> |
3982 | +</html> |
3983 | |
3984 | === added file 'tests/ej-encuen-program-2.html' |
3985 | --- tests/ej-encuen-program-2.html 1970-01-01 00:00:00 +0000 |
3986 | +++ tests/ej-encuen-program-2.html 2017-07-08 22:31:52 +0000 |
3987 | @@ -0,0 +1,899 @@ |
3988 | +<!DOCTYPE html> |
3989 | +<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--> |
3990 | +<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--> |
3991 | +<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--> |
3992 | +<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--> |
3993 | +<!--[if gt IE 9]><!--> |
3994 | +<!--[if lte IE 9]> |
3995 | + <link href='/frontend/css/animations-ie-fix.css' rel='stylesheet'> |
3996 | +<![endif]--> |
3997 | +<html class="no-js" lang="en"> |
3998 | +<!--<![endif]--> |
3999 | +<head> |
4000 | +<meta charset="UTF-8" /> |
4001 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
4002 | +<!-- Twitter Card data --> |
4003 | +<meta name="twitter:site" content="@canalencuentro"> |
4004 | +<meta name="twitter:title" content="Serie Contra todo pronóstico"> |
4005 | +<!-- Twitter summary card with large image must be at least 280x150px --> |
4006 | +<meta name="twitter:image:src" content="http://encuentro.gob.ar/files/Programa_Leones-blancos.jpg"> |
4007 | + |
4008 | +<!-- Open Graph data --> |
4009 | +<meta property="og:title" content="Serie Contra todo pronóstico" /> |
4010 | +<meta property="og:type" content="video" /> |
4011 | +<meta property="og:url" content="http://encuentro.gob.ar/programas/series/9043" /> |
4012 | +<meta property="og:image" content="http://encuentro.gob.ar/files/Programa_Leones-blancos.jpg" /> |
4013 | +<meta property="og:site_name" content="Canal Encuentro" /> |
4014 | +<title>Leones blancos. Nacidos salvajes (T1), Contra todo pronóstico - Canal Encuentro</title> |
4015 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
4016 | +<link href='https://fonts.googleapis.com/css?family=Asap:400,400italic,700,700italic' rel='stylesheet' type='text/css'> |
4017 | +<link rel="stylesheet" type="text/css" href="/frontend/css/encuentro.css" /> |
4018 | +<!-- <link rel="shortcut icon" href="/images/favicon.ico?v=2"> --> |
4019 | +<link rel="shortcut icon" href="/images/favicon.png?v=3"> |
4020 | +<!-- REVOLUTION STYLE SHEETS --> |
4021 | +<link rel="stylesheet" type="text/css" href="/frontend/css/settings.css"> |
4022 | +<!-- REVOLUTION LAYERS STYLES --> |
4023 | +<link rel="stylesheet" type="text/css" href="/frontend/css/layers.css"> |
4024 | +<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
4025 | +<script src="/frontend/js/menu.js"></script> |
4026 | +<script src="/frontend/js/modernizr.min.js"></script> |
4027 | +<script src="/frontend/js/bootstrap.js"></script> |
4028 | + |
4029 | +<!-- REVOLUTION JS FILES --> |
4030 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.tools.min.js"></script> |
4031 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.revolution.min.js"></script> |
4032 | + |
4033 | +<script type="text/javascript"> |
4034 | +<!-- |
4035 | +function viewport() |
4036 | +{ |
4037 | +var e = window |
4038 | +, a = 'inner'; |
4039 | +if ( !( 'innerWidth' in window ) ) |
4040 | +{ |
4041 | +a = 'client'; |
4042 | +e = document.documentElement || document.body; |
4043 | +} |
4044 | +return { width : e[ a+'Width' ] , height : e[ a+'Height' ] } |
4045 | +} |
4046 | +//--> |
4047 | +</script> |
4048 | +<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-1463165-1', 'auto');ga('set', 'anonymizeIp', true);ga('send', 'pageview');</script></head> |
4049 | + |
4050 | +<script> |
4051 | +$( document ).ready(function() { |
4052 | + //trackeo para analytics |
4053 | + $("a.ga_encuentro_track").click(function(e) { |
4054 | + var ga_category = $(e.currentTarget).data('ga_category'); |
4055 | + var ga_action = $(e.currentTarget).data('ga_action'); |
4056 | + var ga_label = $(e.currentTarget).data('ga_label'); |
4057 | + |
4058 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
4059 | + }); |
4060 | +}); |
4061 | + |
4062 | +//hago esta funcion para poder usarla desde otros lugares tambien |
4063 | +function encuentroTrackAnalytics(ga_category, ga_action, ga_label){ |
4064 | + if(typeof dondeEstoy !== 'undefined' && dondeEstoy != null){ |
4065 | + ga_category = dondeEstoy; |
4066 | + } |
4067 | + |
4068 | + ga('send', 'event', ga_category, ga_action, ga_label); |
4069 | +} |
4070 | +</script> <body> |
4071 | + <div id="wrap"> |
4072 | + <header> |
4073 | + <div class="menu"> |
4074 | + <div class="col-xs-2"> |
4075 | + <a href="/"> |
4076 | + <div class="logo"></div> |
4077 | + </a> |
4078 | + </div> |
4079 | + <div class="col-xs-2 section-m">Catálogo</div> |
4080 | + <div class="col-xs-9"> |
4081 | + <div class="search-mov"> |
4082 | + <div class="dropdown"> |
4083 | + <div class="btn btn-default dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" role="button"> |
4084 | + <p class="icon-search"></p> |
4085 | + </div> |
4086 | + <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
4087 | + <li> |
4088 | + <form action="/search/" class="navbar-form"> |
4089 | + <div class="form-group"> |
4090 | + <input type="text" name="keywords" class="form-control" placeholder=""> |
4091 | + </div> |
4092 | + <button type="submit" class="btn btn-default"> |
4093 | + <span class="icon-right-open"></span> |
4094 | + </button> |
4095 | + </form> |
4096 | + </li> |
4097 | + </ul> |
4098 | + </div> |
4099 | + </div> |
4100 | + <div class="menu_bar"> |
4101 | + <a href="#" class="bt-menu"> |
4102 | + </a> |
4103 | + </div> |
4104 | + <nav id="topmenu"> |
4105 | + <ul> |
4106 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="boton_menu" data-ga_label="inicio" href="/">Inicio</a></li> |
4107 | + <li><a class="ga_encuentro_track" data-ga_category="catalogo" data-ga_action="boton_menu" data-ga_label="catalogo" href="http://encuentro.gob.ar/programas">Catálogo</a></li> |
4108 | + <li><a class="ga_encuentro_track" data-ga_category="grilla" data-ga_action="boton_menu" data-ga_label="grilla" href="http://encuentro.gob.ar/programacion">Grilla</a></li> |
4109 | + <li><a class="ga_encuentro_track" data-ga_category="en_vivo" data-ga_action="boton_menu" data-ga_label="en_vivo" href="http://encuentro.gob.ar/envivo">En vivo</a></li> |
4110 | + <li><a class="ga_encuentro_track" data-ga_category="en_el_aula" data-ga_action="boton_menu" data-ga_label="en_el_aula" href="http://encuentro.gob.ar/enelaula">En el aula</a></li> |
4111 | + <li><a class="ga_encuentro_track" data-ga_category="transmedia" data-ga_action="boton_menu" data-ga_label="transmedia" href="http://encuentro.gob.ar/interactivos">Transmedia</a></li> |
4112 | + <li><a class="ga_encuentro_track" data-ga_category="efemerides" data-ga_action="boton_menu" data-ga_label="efemerides" href="http://encuentro.gob.ar/efemerides">Efemérides</a></li> |
4113 | + </ul> |
4114 | + </nav> |
4115 | + </div> |
4116 | + </div> |
4117 | +</header> |
4118 | + <div id="morphsearch" class="morphsearch hide-from-print" role="banner"> |
4119 | + <span class="morphsearch-close"></span> |
4120 | +<form method="GET" action="http://encuentro.gob.ar/search" accept-charset="UTF-8" class="morphsearch-form"> |
4121 | + <div class="buscar"> |
4122 | + <input class="morphsearch-input" type="search" id="keywords" name="keywords"/> |
4123 | + </div> |
4124 | +</form> |
4125 | + <div class="morphsearch-content"> |
4126 | + <div class="dummy-column"> |
4127 | + <ul class="busqueda" id="busqueda"> |
4128 | + </ul> |
4129 | + </div> |
4130 | + <div class="dummy-column" id="programas"> |
4131 | + </div> |
4132 | + <div class="dummy-column" id="guias"> |
4133 | + </div> |
4134 | + <div class="clr"></div> |
4135 | + <div class="botones-busqueda"> |
4136 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_normal">Buscar en Encuentro</a> </div> |
4137 | + <div class="col-md-6"><a href="#" class="bus-button" id="search_subtitles">Buscar por subtítulos</a> </div> |
4138 | + </div> |
4139 | + </div> |
4140 | + <!-- /morphsearch-content --> |
4141 | +</div> |
4142 | +<!-- /morphsearch --> |
4143 | +<div class="overlay"></div> |
4144 | +<!-- /container --> |
4145 | +<script src="/frontend/js/classie.js"></script> |
4146 | +<script src="/frontend/js/search.js"></script> |
4147 | +<script src="/frontend/js/main.js"></script> |
4148 | + |
4149 | +<script> |
4150 | +$("#search_normal").on('click', function() { |
4151 | + var keywords = $('#keywords').val(); |
4152 | + var req = new XMLHttpRequest(); |
4153 | + var url = "/search/?keywords="+keywords; |
4154 | + window.location.href = url; |
4155 | +}); |
4156 | + |
4157 | +$("#search_subtitles").on('click', function() { |
4158 | + var keywords = $('#keywords').val(); |
4159 | + var req = new XMLHttpRequest(); |
4160 | + var url = "/search/subtitle/?keywords="+keywords; |
4161 | + window.location.href = url; |
4162 | +}); |
4163 | + |
4164 | + |
4165 | +$("#keywords").keyup(function() { |
4166 | + |
4167 | + var keywords = $('#keywords').val(); |
4168 | + |
4169 | + if (keywords.length <= 2) { |
4170 | + return; |
4171 | + } |
4172 | + |
4173 | + var url = '/search/predictive?keywords='+keywords; |
4174 | + |
4175 | + $.getJSON(url, function(results, status) { |
4176 | + if (status == "success") { |
4177 | + $("#programas").html(""); |
4178 | + $("#guias").html(""); |
4179 | + $("#busqueda").html(""); |
4180 | + $("#busqueda").append('<h2>o tal vez estas buscando</h2>'); |
4181 | + for (var i in results.keywords) { |
4182 | + if (i >= 5) |
4183 | + break; |
4184 | + $("#busqueda").append('<li><a href="/search?keywords='+results.keywords[i]+'">'+results.keywords[i]+'<span class="icn icn-ir"></span></a></li>'); |
4185 | + } |
4186 | + |
4187 | + if (results.programs.length == 0) { |
4188 | + $("#programas").append('<h2>No se han encontrado resultados relevantes en <strong>programas</strong></h2>'); |
4189 | + return; |
4190 | + } else { |
4191 | + $("#programas").append('<h2>Resultados relevantes en <strong>programas</strong></h2>'); |
4192 | + } |
4193 | + for (var i in results.programs) { |
4194 | + if (i >= 2) |
4195 | + break; |
4196 | + var image = "/images/placeholder_360x230.jpg"; |
4197 | + if (results.programs[i].image) { |
4198 | + image = '/files/'+results.programs[i].image.file; |
4199 | + } |
4200 | + var title = results.programs[i].title; |
4201 | + $("#programas").append('<a href="/programas/'+results.programs[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado"/></div><div class="text-busqueda"><h5>'+title+'</h5><p>'+results.programs[i].type+'</p></div></dd></a>'); |
4202 | + } |
4203 | + |
4204 | + if (results.resources.length == 0) { |
4205 | + $("#guias").append('<h2>No se han encontrado resultados relevantes en <strong>guías</strong></h2>'); |
4206 | + return; |
4207 | + } else { |
4208 | + $("#guias").append('<h2>Resultados relevantes en <strong>guías</strong></h2>'); |
4209 | + } |
4210 | + for (var i in results.resources) { |
4211 | + var image = "/images/placeholder_360x230.jpg"; |
4212 | + if (results.resources[i].image) { |
4213 | + image = '/files/'+results.resources[i].image.file; |
4214 | + } |
4215 | + $("#guias").append('<a href="/enelaula/'+results.resources[i].id+'" class="relevante"><dd><div class="img-busq"><img src="'+image+'" class="img-responsive" alt="resultado" height="230"/></div><div class="text-busqueda"><h5>'+results.resources[i].title+'</h5><p>'+results.resources[i].category.replace(',', '')+'</p></div></dd></a>'); |
4216 | + } |
4217 | + |
4218 | + } else { |
4219 | + alert("Hubo un problema con la llamada a Educ.ar"); |
4220 | + } |
4221 | + }); |
4222 | +}); |
4223 | +</script> <section> |
4224 | + <a name="top-video"></a> |
4225 | + <div id="video-play"> |
4226 | + <div class="container"> |
4227 | + <div class="video-play"> |
4228 | + <div id="player"> |
4229 | + <div class="video-sin"> |
4230 | + <div class="overlay-sin-video" id="vote-section"> |
4231 | + <p>Programa no disponible on-line</p> |
4232 | + </div> |
4233 | + <img src="/images/video-preview.jpg" class="img-responsive" alt="producciones"> |
4234 | + </div> |
4235 | + </div> |
4236 | + |
4237 | + <div class="video-desc"> |
4238 | + <div class="col-md-9"> |
4239 | + <main> |
4240 | + <a href="#top-video"><h3 id="program-title"><bold>Leones blancos. Nacidos salvajes</bold> / Contra todo pronóstico</h3></a> |
4241 | + <a href="#" id="btnTemporadas" class="btnTemporadas" style="display:none;">TEMPORADAS</a> |
4242 | + </main> |
4243 | + </div> |
4244 | + <div class="col-md-28"> |
4245 | + <ul class="video-share"> |
4246 | + <li id="open-cc"><span class="icn icn-lista" id="cc-icon"></span></li> |
4247 | + <li> |
4248 | + <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> |
4249 | + <script type="text/javascript">stLight.options({publisher: '9e4d1b956e006dd92bf3cb51daffae49'});</script> |
4250 | + <span class="st_sharethis_custom"><span class="icn icn-compartir"></span></span> |
4251 | + </li> |
4252 | + </ul> |
4253 | + </div> |
4254 | + </div> |
4255 | + </div> |
4256 | + </div> |
4257 | + </div> |
4258 | + |
4259 | +<script> |
4260 | +/*var currentProgramId = 9043; |
4261 | +function vote() |
4262 | +{ |
4263 | + var req = new XMLHttpRequest(); |
4264 | + var url = "/programas/votar/"+currentProgramId+"?email=test@mail.com"; |
4265 | + $.get(url, {}, function(){ }); |
4266 | + $('#votes').text(1); |
4267 | + $('#vote-section').html('Gracias por tu voto.'); |
4268 | +}*/ |
4269 | + |
4270 | + $('#open-cc').hide(); |
4271 | + |
4272 | +currentProgramId = 9043; |
4273 | +//); |
4274 | + |
4275 | +/* |
4276 | +$(document).ready(function() { |
4277 | + var time = typeof timeStart !== 'undefined' ? timeStart : 10; |
4278 | + |
4279 | + //jwplayer6 |
4280 | + var config = { |
4281 | + playlist: [{ |
4282 | + //image: videoScreenshotURL + recurso.rec_id + '&t=' + time + '&w=540&h=360', |
4283 | + sources: [ |
4284 | + { |
4285 | + file: "http://repositoriovideo-download.educ.ar/repositorio/Video/ver?file_id=280fa7e6-7e2b-4f0e-907f-5521e6b2c6a5&rec_id=50018", |
4286 | + label: "360p", |
4287 | + type: "mp4", |
4288 | + autostart: false |
4289 | + } |
4290 | + ] |
4291 | + }], |
4292 | + width: '100%', |
4293 | + height: '100%' |
4294 | + }; |
4295 | + |
4296 | + |
4297 | + console.log(config); |
4298 | + jwplayer("programa").setup(config); |
4299 | + |
4300 | +// if (typeof timeStart !== 'undefined') { |
4301 | +// jwplayer().seek(timeStart); |
4302 | +// } |
4303 | + |
4304 | + |
4305 | +// jwplayer().onReady(VerPrograma.jwplayerInitConfig); |
4306 | + |
4307 | +}); |
4308 | +*/ |
4309 | + |
4310 | +$( document ).ready(function() { |
4311 | + if($("#season").length > 0){ |
4312 | + $("#btnTemporadas").show(); |
4313 | + } |
4314 | + |
4315 | + $("#btnTemporadas").click(function(e) { |
4316 | + if($("#season").length){ |
4317 | + $('html, body').animate({ |
4318 | + scrollTop: $("#season").offset().top - 200 |
4319 | + }, 500); |
4320 | + } |
4321 | + }); |
4322 | +}); |
4323 | + |
4324 | +</script> <div id="fixed-video"> |
4325 | + <div class="container"> |
4326 | + <div class="container-95"> |
4327 | + <div class="video-desc"> |
4328 | + <a href="#top-video"> |
4329 | + <div class="col-md-9"> |
4330 | + <main> |
4331 | + <a href="#top-video"><h3 id="program-title"><bold>Leones blancos. Nacidos salvajes</bold> / Contra todo pronóstico</h3></a> |
4332 | + </main> |
4333 | + </div> |
4334 | + </a> |
4335 | + <div class="col-md-28"> |
4336 | + <ul class="video-share"> |
4337 | + |
4338 | + <li> |
4339 | + <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> |
4340 | + <script type="text/javascript">stLight.options({publisher: '9e4d1b956e006dd92bf3cb51daffae49'});</script> |
4341 | + <span class="st_sharethis_custom"><span class="icn icn-compartir"></span></span> |
4342 | + </li> |
4343 | + </ul> |
4344 | + </div> |
4345 | + </div> |
4346 | + </div> |
4347 | + </div> |
4348 | +</div> |
4349 | + |
4350 | + <div class="container"> |
4351 | + <div id="main"> |
4352 | + <div id="horario" class="col-md-2"> |
4353 | + <div class="col-md-13"> |
4354 | + <h5 class="text-uppercase">ahora en encuentro</h5> |
4355 | + <div id="grilla"> |
4356 | + </div> |
4357 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_ver_mas" data-ga_label="grilla completa" href="/programacion/" class="hor-button grilla-button">grilla completa</a> |
4358 | +</div> |
4359 | + |
4360 | + |
4361 | +<script> |
4362 | +/* |
4363 | +var d = new Date(); |
4364 | +var date_from = d.toISOString(); |
4365 | + |
4366 | +var hostname = 'http://apipub-canales.encuentro.gov.ar/1.0/grilla'; |
4367 | +var path = '/'; |
4368 | +var app_key = '8f0d681747a7490d1d2138fd3aa1bfc39209f64a'; |
4369 | +var params = { |
4370 | + app_key: app_key, |
4371 | + canal: "Portal Encuentro", |
4372 | + fecha_inicio: date_from, |
4373 | +} |
4374 | + |
4375 | +var query = encodeURIComponent(JSON.stringify(params)); |
4376 | +//var query = JSON.stringify(params); |
4377 | +var url = hostname + path + query; |
4378 | +*/ |
4379 | + |
4380 | +var url = '/programacion/hoy/'; |
4381 | + |
4382 | +$("#grilla").html('<div class="loader-ajax"></div>'); |
4383 | + |
4384 | +$.getJSON(url, function(dias, status) { |
4385 | + |
4386 | + if (status == "success") { |
4387 | + |
4388 | + if (dias.length == 0) { |
4389 | + $("#grilla").html('No hay programación disponible para este día'); |
4390 | + return; |
4391 | + } |
4392 | + var cant_programas = 1; |
4393 | + |
4394 | + $("#grilla").html(''); |
4395 | + var grid_list = '<ul>'; |
4396 | + |
4397 | + for (var i in dias) { |
4398 | + |
4399 | + for (var j in dias[i]["programas"]) { |
4400 | + |
4401 | + var image = dias[i]["programas"][j].imagen; |
4402 | + var title_original = dias[i]["programas"][j].title; |
4403 | + var title = truncate(title_original, 25, false); |
4404 | + |
4405 | + if (dias[i]["programas"][j].id > -1) |
4406 | + programURL = "/programas/"+dias[i]["programas"][j].id+"/"; |
4407 | + else |
4408 | + programURL = "#"; |
4409 | + |
4410 | + if (cant_programas == 1) { |
4411 | + //grid_list += '<li id="destacado-movil"><a href="'+programURL+'" class="video-pr-ds"><img src="'+image+'" class="img-responsive" alt="'+title_original+'"></a><a href="'+programURL+'"><li class="hora-pr-col"><time class="hora-pr">'+j+'</time><p class="title-pr">'+title+'</p></div></a></li>'; |
4412 | + grid_list += '<li id="destacado-movil"><a class="video-pr-ds ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title_original+'" href="'+programURL+'" ><img src="'+image+'" class="img-responsive" alt="'+title_original+'"></a><a class="ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title_original+'" href="'+programURL+'"></div></a></li>'; |
4413 | + } /*else {*/ |
4414 | + grid_list += '<li class="destacados-horarios"><a class="ga_encuentro_track_grid" data-ga_category="grilla" data-ga_action="link_grilla" data-ga_label="'+title+'" href="'+programURL+'"><div id="overlay-clasic"><span class="ver-ficha-horario">ver ficha</span> </div><div class="hora-pr-col"><div class="hora-pr">'+j+'</div><div class="title-pr">'+title+'</div></div></a></li>'; |
4415 | + //} |
4416 | + cant_programas++; |
4417 | + |
4418 | + if (cant_programas >= 10) |
4419 | + break; |
4420 | + } |
4421 | + } |
4422 | + grid_list += '</ul>'; |
4423 | + $("#grilla").append(grid_list); |
4424 | + |
4425 | + //trackeo para analytics |
4426 | + $("a.ga_encuentro_track_grid").click(function(e) { |
4427 | + var ga_category = $(e.currentTarget).data('ga_category'); |
4428 | + var ga_action = $(e.currentTarget).data('ga_action'); |
4429 | + var ga_label = $(e.currentTarget).data('ga_label'); |
4430 | + |
4431 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
4432 | + }); |
4433 | + |
4434 | + } else { |
4435 | + console.log("Hubo un problema con la llamada."); |
4436 | + } |
4437 | +}); |
4438 | + |
4439 | +function truncate(str, n, useWordBoundary) { |
4440 | + var singular, tooLong = str.length > n; |
4441 | + useWordBoundary = useWordBoundary || true; |
4442 | + |
4443 | + // Edge case where someone enters a ridiculously long string. |
4444 | + str = tooLong ? str.substr(0, n-1) : str; |
4445 | + |
4446 | + singular = (str.search(/\s/) === -1) ? true : false; |
4447 | + if(!singular) { |
4448 | + str = useWordBoundary && tooLong ? str.substr(0, str.lastIndexOf(' ')) : str; |
4449 | + } |
4450 | + |
4451 | + return tooLong ? str + '…' : str; |
4452 | +} |
4453 | +</script> |
4454 | + |
4455 | + </div> |
4456 | + <div id="central" class="col-md-9"> |
4457 | + <div class="col-em-11" id="loader"> |
4458 | +</div> |
4459 | +<div class="col-em-11" id="cc" style="display: 'none';"> |
4460 | + <h4 class="title-sinopsis">Subtitulos y transcripción</h4> |
4461 | + <div class="col-sub" id="cc-list" style="height: 500px; overflow-y: scroll;"> |
4462 | + </div> |
4463 | +</div> |
4464 | + |
4465 | +<div class="col-em-11" id="sinopsis"><!-- INICIO sinoposis --> |
4466 | + <h4 class="title-sinopsis">Sinopsis</h4> |
4467 | + <div id="sinopsis"> |
4468 | + <div class="col-md-3"> |
4469 | + <img src="/files/Programa_Leones-blancos.jpg" class="img-responsive" alt="programas" id="sinopsis_image"> |
4470 | + </div> |
4471 | + <div class="text-sinopsis"> |
4472 | + <p id="sinopsis_text">La reserva Kruger es la joya de Sudáfrica, un paraíso de la vida salvaje. En un extremo llamado Timbavati, la naturaleza está conduciendo un experimento único: la supervivencia de dos cachorros de león blancos, una especie que solo aparece una vez por generación.</p> |
4473 | + <ul class="tags"> |
4474 | + <li><a href="/search/?keywords=naturaleza">naturaleza</a></li> |
4475 | + <li><a href="/search/?keywords= biología"> biología</a></li> |
4476 | + <li><a href="/search/?keywords= animales"> animales</a></li> |
4477 | + </ul> |
4478 | + </div> |
4479 | + </div> |
4480 | + |
4481 | + <div class="col-md-3"> |
4482 | + <h4 class="title-sinopsis" id="next_shows_title"></h4> |
4483 | + </div> |
4484 | + <div class="col-md-9"> |
4485 | + <div id="next_shows"></div> |
4486 | + <div id="botones-sinopsis"> |
4487 | + </div> |
4488 | + </div> |
4489 | + <div class="clr"></div> |
4490 | + |
4491 | + |
4492 | + |
4493 | +</div> |
4494 | + |
4495 | +<script src="/frontend/js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script> |
4496 | +<script src="/frontend/js/jquery.featureCarousel.js" type="text/javascript" charset="utf-8"></script> |
4497 | + |
4498 | +<script type="text/javascript"> |
4499 | + |
4500 | +var hostname = 'http://apipub-canales.encuentro.gov.ar/1.0/proximas-emisiones'; |
4501 | +var path = '/'; |
4502 | +var app_key = '8f0d681747a7490d1d2138fd3aa1bfc39209f64a'; |
4503 | +var params = { |
4504 | +app_key: app_key, |
4505 | +canal: "Portal Encuentro" |
4506 | +} |
4507 | + |
4508 | +var query = encodeURIComponent(JSON.stringify(params)); |
4509 | +//var query = JSON.stringify(params); |
4510 | +var url = hostname + path + "131573/" +query; |
4511 | + |
4512 | +$.getJSON(url, function(results, status) { |
4513 | +if (status == "success") { |
4514 | + |
4515 | + if (results) |
4516 | + $("#next_shows_title").html("Próximas</br>emisiones"); |
4517 | + |
4518 | + $.each( results, function( date, emision ) { |
4519 | + var day = date.split("-")[2]; |
4520 | + var month = date.split("-")[1]; |
4521 | + var year = date.split("-")[0]; |
4522 | + $.each( emision.programas, function( time, value ) { |
4523 | + var hour = time.split(":")[0]; |
4524 | + var minute = time.split(":")[1]; |
4525 | + |
4526 | + var title = value.titulo; |
4527 | + |
4528 | + var hourOne = parseInt(hour) + 1; |
4529 | + if (hourOne < 10) hourOne = "0"+hourOne; |
4530 | + var calTime = year+month+day+'T'+hour+minute+'00/'+year+month+day+'T'+hourOne+minute+'00'; |
4531 | + var cal = 'http://www.google.com/calendar/event?action=TEMPLATE&text='+title+'&dates='+calTime+'&details=Canal Encuentro' |
4532 | + var append = '<div class="col-md-13 emisiones-rec"><div id="overlay-clasic"><a href="'+cal+'"><ul><li><span class="icon-plus"></span> </li>agregar a mi calendario</ul></a></div><div class="emision"><p class="dia-em">'+day+'</p>de '+getMonthName(month)+'</div><div class="remember"><time class="dia-hora"><p><strong>'+hour+':'+minute+' hs</strong></p></time><p>'+title+'</p></div><a href="'+cal+'" class="bot-calen mov">agregar a mi calendario</a></div>'; |
4533 | + $("#next_shows").append(append); |
4534 | + }); |
4535 | + }); |
4536 | + |
4537 | +} else { |
4538 | + console.log("Hubo un problema con la llamada."); |
4539 | +} |
4540 | +}); |
4541 | + |
4542 | +function getMonthName(month) |
4543 | +{ |
4544 | + var name = 'Enero'; |
4545 | + switch (month) { |
4546 | + case 2: |
4547 | + name = 'Febrero'; |
4548 | + break; |
4549 | + case 3: |
4550 | + name = 'Marzo'; |
4551 | + break; |
4552 | + case 4: |
4553 | + name = 'Abril'; |
4554 | + break; |
4555 | + case 5: |
4556 | + name = 'Mayo'; |
4557 | + break; |
4558 | + case 6: |
4559 | + name = 'Junio'; |
4560 | + break; |
4561 | + case 7: |
4562 | + name = 'Julio'; |
4563 | + break; |
4564 | + case 8: |
4565 | + name = 'Agosto'; |
4566 | + break; |
4567 | + case 9: |
4568 | + name = 'Septiembre'; |
4569 | + break; |
4570 | + case 10: |
4571 | + name = 'Octubre'; |
4572 | + break; |
4573 | + case 11: |
4574 | + name = 'Noviembre'; |
4575 | + break; |
4576 | + case 12: |
4577 | + name = 'Diciembre'; |
4578 | + break; |
4579 | + } |
4580 | + return name; |
4581 | +} |
4582 | + |
4583 | +$(document).ready(function() { |
4584 | + var carousel = $("#carousel-emis").featureCarousel({ |
4585 | + // include options like this: |
4586 | + // (use quotes only for string values, and no trailing comma after last option) |
4587 | + // option: value, |
4588 | + // option: value |
4589 | + }); |
4590 | + |
4591 | +}); |
4592 | + |
4593 | +$("#loader").hide(); |
4594 | +$("#cc").hide(); |
4595 | + |
4596 | +$('#open-cc').on('click', function() |
4597 | +{ |
4598 | + if ($("#cc").is(":visible")) |
4599 | + { |
4600 | + $("#cc").hide(); |
4601 | + } else { |
4602 | + $('#loader').show(); |
4603 | + $("#loader").html('<div class="loader-ajax"></div>'); |
4604 | + var url = "/programas/srt/"+currentProgramId+"/"; |
4605 | + $.getJSON(url, function(results, status) { |
4606 | + $('#loader').hide(); |
4607 | + if (status == "success") { |
4608 | + var html = ''; |
4609 | + for (var i in results) { |
4610 | + html += '<div class="lineaCC">'; |
4611 | + html += '<div class="col-md-3 hora-subtitles" data-time="'+results[i].startSeconds+'">'+results[i].startTime+'</div>'; |
4612 | + html += '<div class="col-md-9 text-subtitles"><p>'+results[i].text+'</p></div>'; |
4613 | + html += '</div>'; |
4614 | + } |
4615 | + $("#cc-list").html(html); |
4616 | + $("#cc").show(); |
4617 | + } else { |
4618 | + alert("Hubo un problema con la llamada a Educ.ar"); |
4619 | + } |
4620 | + }); |
4621 | + |
4622 | + var iframe = document.getElementById("player"); |
4623 | + //iframe.contentWindow.jwplayer().on('time', playerUpdates); |
4624 | + |
4625 | + |
4626 | + } |
4627 | +}); |
4628 | + |
4629 | +$("#cc").on("click", ".lineaCC", function(e){ |
4630 | + var seekValue = $(".hora-subtitles", this).attr('data-time'); |
4631 | + window.location = "/programas/131574?start="+seekValue; |
4632 | +}); |
4633 | +</script> |
4634 | + <div id="season"> |
4635 | + <div class="temporada" id="menu-control"> |
4636 | + <div class="container-95">Ver capítulos/temporadas</div> |
4637 | + </div> |
4638 | + <div class="container-95" id="season-menu"> |
4639 | + <div class="col-md-28"> |
4640 | + <ul class="nav nav-pills nav-stacked" id="episode"> |
4641 | + <li class="active" id="season-0"><a href="#" class="season-tab" season-id="season-0">Leones blancos. Nacidos salvajes</a></li> |
4642 | + </ul> |
4643 | + </div> |
4644 | + <div class="col-md-9"> |
4645 | + <div class="tab-content"> |
4646 | + <div class="tab-pane active" id="season-0-block" season-id="season-0"> |
4647 | + <div class="col-md-13" id="grilla_"> |
4648 | + <div class="col-md-13 grilla-rec"> |
4649 | + <div class="hora-grilla">E <strong>1</strong></div> |
4650 | + <div class="img-grilla"><img src="/files/Programa_Leones-blancos.jpg" class="img-responsive" alt="aula"></div> |
4651 | + <div class="text-grilla"> |
4652 | + <h4>Contra todo pronóstico</h4> |
4653 | + </div> |
4654 | + <div class="ver-grilla-table"> |
4655 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="Contra todo pronóstico" href="#" program-id="9043" season="1">ver episodio</a> |
4656 | + </div> |
4657 | + </div> |
4658 | + <div class="col-md-13 grilla-rec"> |
4659 | + <div class="hora-grilla">E <strong>2</strong></div> |
4660 | + <div class="img-grilla"><img src="/files/Programa_Leones-blancos.jpg" class="img-responsive" alt="aula"></div> |
4661 | + <div class="text-grilla"> |
4662 | + <h4>La lucha por la supervivencia</h4> |
4663 | + </div> |
4664 | + <div class="ver-grilla-table"> |
4665 | + <a class="play-episode ga_encuentro_track" data-ga_category="catalogo" data-ga_action="play" data-ga_label="La lucha por la supervivencia" href="#" program-id="9044" season="1">ver episodio</a> |
4666 | + </div> |
4667 | + </div> |
4668 | + </div> |
4669 | + </div> |
4670 | + </div> |
4671 | + </div> |
4672 | + </div> |
4673 | +</div> |
4674 | +<div class="clr"></div> |
4675 | + |
4676 | +<script type="text/javascript"> |
4677 | +var selectedSeason = "season-0"; |
4678 | + |
4679 | +$( document ).ready(function() { |
4680 | + |
4681 | + initializeEvents(); |
4682 | + |
4683 | +// $("#season-menu").hide(); |
4684 | +}); |
4685 | + |
4686 | + |
4687 | +function initializeEvents(){ |
4688 | + $('.season-tab').on('click', function() { |
4689 | + var seasonId = $(this).attr("season-id"); |
4690 | + $("#"+selectedSeason).removeClass("active"); |
4691 | + $("#"+selectedSeason+"-block").removeClass("active"); |
4692 | + $("#"+selectedSeason+"-block").addClass("fade"); |
4693 | + $("#"+seasonId).addClass("active"); |
4694 | + $("#"+seasonId+"-block").removeClass("fade"); |
4695 | + $("#"+seasonId+"-block").addClass("active"); |
4696 | + selectedSeason = seasonId; |
4697 | + }); |
4698 | + |
4699 | + $('#episode a').click(function (e) { |
4700 | + e.preventDefault(); |
4701 | + //$(this).tab('show') |
4702 | + }); |
4703 | + |
4704 | + $('.btn_ver_mas_capitulos').click(function (e) { |
4705 | + e.preventDefault(); |
4706 | + var spanSeasonId = $(e.target).data('span_season'); |
4707 | + $("#"+spanSeasonId).show(); |
4708 | + $(this).hide(); |
4709 | + }); |
4710 | + |
4711 | + $('.btn_ver_menos_capitulos').click(function (e) { |
4712 | + e.preventDefault(); |
4713 | + var spanSeasonId = $(e.target).data('span_season'); |
4714 | + $("#"+spanSeasonId).hide(); |
4715 | + var btnVerMasId = spanSeasonId.replace('span','btn'); |
4716 | + $("#"+btnVerMasId).show(); |
4717 | + $('html, body').animate({ |
4718 | + scrollTop: $("#season").offset().top - 200 |
4719 | + }, 500); |
4720 | + }); |
4721 | + |
4722 | + $('#menu-control').on('click', function() |
4723 | + { |
4724 | + if ($("#season-menu").is(":visible")) |
4725 | + { |
4726 | + $("#season-menu").hide(); |
4727 | + $('#menu-control').removeClass("open"); |
4728 | + } else { |
4729 | + $("#season-menu").show(); |
4730 | + $('#menu-control').addClass("open"); |
4731 | + } |
4732 | + }); |
4733 | + |
4734 | + $('.play-episode').on('click', function() |
4735 | + { |
4736 | + var programId = $(this).attr("program-id"); |
4737 | + var season = $(this).attr("season"); |
4738 | + |
4739 | + var url = "/programas/json/" + programId; |
4740 | + |
4741 | + $.getJSON(url, function(results, status) { |
4742 | + for (var i in results) { |
4743 | + var title = "Leones blancos. Nacidos salvajes / "+results.title; |
4744 | + var educarId = results.educar_id; |
4745 | + if (results.web_enabled) { |
4746 | + $('#player').html('<div style="position: relative; height: 0; padding-top: 56.248%"><iframe id="player_frame" frameborder="0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" allowfullscreen src="http://videos.encuentro.gob.ar/video/?id='+educarId+'&poster=0&cc=0&info=0&skin=glow"></iframe></div>'); |
4747 | + } else { |
4748 | + //$('#player').html('<div class="video-sin"><div class="overlay-sin-video" id="vote-section"><p>Programa no disponible on-line</p><button id="vote" onClick="vote();">Quiero que vuelva a la pantalla de Encuentro</button><p class="votaron"><strong><span id="votes">'+results.votes+'</span></strong> personas ya votaron</p></div><img src="/images/video-preview.jpg" class="img-responsive" alt="producciones"></div>'); |
4749 | + $('#player').html('<div class="video-sin"><div class="overlay-sin-video" id="vote-section"><p>Programa no disponible on-line</p></div><img src="/images/video-preview.jpg" class="img-responsive" alt="producciones"></div>'); |
4750 | + currentProgramId = results.id; |
4751 | + } |
4752 | + |
4753 | + $('#player').attr('src', 'http://videos.encuentro.gob.ar/video/?id='+educarId+'&poster=0&cc=0&info=0&skin=glow'); |
4754 | + $('#program-title').html(title); |
4755 | + $('#program-duration').html('duración <strong>'+results.duration+' minutos</strong>'); |
4756 | + $('#download').attr('href', results.download_url_sd); |
4757 | + $('#sinopsis_text').html(results.description); |
4758 | + history.pushState({}, title, "/programas/serie/9042/"+programId+'?temporada='+season); |
4759 | + document.title = "Leones blancos. Nacidos salvajes (T"+season+"), "+results.title+" - Canal Encuentro"; |
4760 | + |
4761 | + if (results.closed_captions && results.closed_captions.length > 0 ) { |
4762 | + $('#open-cc').show(); |
4763 | + } else { |
4764 | + $('#open-cc').hide(); |
4765 | + } |
4766 | + |
4767 | +// $("#season-menu").hide(); |
4768 | +// $('#menu-control').removeClass("open"); |
4769 | + $("#cc").hide(); |
4770 | + $("#sinopsis").show(); |
4771 | + |
4772 | + currentProgramId = programId; |
4773 | + } |
4774 | + updateRelated(programId); |
4775 | + }) |
4776 | + .done(function() { console.log('getJSON request succeeded!'); }) |
4777 | + .fail(function(jqXHR, textStatus, errorThrown) { |
4778 | + console.log('getJSON request failed! ' + textStatus); |
4779 | + //$("#educar_info").html(""); |
4780 | + //$("#educar_info").append("<pre>Hubo un problema con la llamada</pre>"); |
4781 | + }) |
4782 | + .always(function() { console.log('getJSON request ended!'); }); |
4783 | + }); |
4784 | +} |
4785 | + |
4786 | +function updateRelated(programId) { |
4787 | + var url = '/programas/related/9042/'+programId; |
4788 | + $.getJSON(url, function(results, status) { |
4789 | + $("#related").hide(); |
4790 | + $("#related-list").html(""); |
4791 | + if (status == "success") { |
4792 | + if (results.length > 0) { |
4793 | + $("#related").show(); |
4794 | + for (var i in results) { |
4795 | + var item = '<div class="destacado-hoy" id="ficha">'; |
4796 | + item += '<a href="'+results[i].path+'" class="video-pr-ds">'; |
4797 | + item += '<div id="overlay-clasic"><div class="icon-see"><span class="plus"></span></div></div>'; |
4798 | + item += '<img src="'+results[i].image_path+'" class="img-responsive" alt="recursos relacionados"></a>'; |
4799 | + item += '<div class="tag-recursos">'+results[i].type+'</div>'; |
4800 | + item += '<div class="subtitle-video">'+results[i].title+'</div></div>'; |
4801 | + $("#related-list").append(item); |
4802 | + } |
4803 | + } |
4804 | + } else { |
4805 | + alert("Hubo un problema con la llamada a Educ.ar"); |
4806 | + console.log(status); |
4807 | + } |
4808 | + }) |
4809 | + .done(function() { console.log('getJSON request succeeded!'); }) |
4810 | + .fail(function(jqXHR, textStatus, errorThrown) { |
4811 | + console.log('getJSON request failed! ' + textStatus); |
4812 | + }) |
4813 | + .always(function() { console.log('getJSON request ended!'); }); |
4814 | +} |
4815 | + |
4816 | +</script> </div> |
4817 | + <div id="video" class="col-md-2"> |
4818 | + </div> |
4819 | + </div> |
4820 | + </div> |
4821 | + </section> |
4822 | + </div> |
4823 | + <div id="footer"> |
4824 | + <div class="container pad-40"> |
4825 | + <div class="container-form"> |
4826 | + <div id="foot-m"> |
4827 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Acerca de Encuentro" href="/acercade">Acerca de Encuentro</a> |
4828 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Cableoperadores" href="/cableoperadores">Cableoperadores</a> |
4829 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Presentacion de proyectos" href="/proyectos">Presentación de proyectos</a> |
4830 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Condiciones de uso" href="/condiciones">Condiciones de uso</a> |
4831 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Informacion para proveedores" target="_blank" href="http://www.educ.ar/sitios/educar/compras/index">Información para proveedores</a> |
4832 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Catalogo de programacion" target="_blank" href="http://catalogo.encuentro.gob.ar/">Catálogo de programación</a> |
4833 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Contacto" href="/contacto">Contacto</a> |
4834 | + <p class="subscribe" id="subscribe_message">Quiero recibir novedades </p> |
4835 | + <input class="mail-subs" placeholder="✉" onfocus="this.placeholder = ''" onblur="this.placeholder = '✉'" name="email" type="email" id="emailfield" required /><input type="submit" value="" class="send-subs" title="enviar" id="subscribe"> |
4836 | + <div class="social"> |
4837 | + <p>Seguinos en</p> |
4838 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Facebook" href="http://facebook.com/canalencuentro"><span class="icn icn-facebook"></span></a> |
4839 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Twitter" href="http://twitter.com/canalencuentro"><span class="icn icn-twitter"></span></a> |
4840 | + <a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Youtube" href="http://youtube.com/encuentro"><span class="icn icn-utube"></span></a> |
4841 | + </div> |
4842 | + </div> |
4843 | + <p>Todos los derechos reservados educ.ar 2016</p> |
4844 | + </div> |
4845 | + </div> |
4846 | + <div id="footer-logos"> |
4847 | + <div class="container"> |
4848 | + <div class="col-foot"> |
4849 | + <ul> |
4850 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Canal Encuentro" href="http://www.encuentro.gov.ar/"><img src="/frontend/images/footer-encuentro.png" alt="Canal Encuentro"></a></li> |
4851 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Sistema Federal de Medios y Contenidos Publicos" href="https://www.argentina.gob.ar/mediospublicos/"><img src="/frontend/images/footer-secretaria.png" alt="Secretaría Federal de Medios y Contenidos Públicos"></a></li> |
4852 | + <li><a class="ga_encuentro_track" data-ga_category="inicio" data-ga_action="link_footer" data-ga_label="Educ.ar" href="https://www.educ.ar/"><img src="/frontend/images/footer-educar.png" alt="Educ.ar"></a></li> |
4853 | + </ul> |
4854 | + </div> |
4855 | + </div> |
4856 | + </div> |
4857 | +</div> |
4858 | + |
4859 | +<script> |
4860 | +$("#subscribe").on('click', function() { |
4861 | + var email = $('#emailfield').val(); |
4862 | + if (email.length == 0 || !validateEmail(email)) |
4863 | + { |
4864 | + $("#subscribe_message").html('El email no es válido.'); |
4865 | + return; |
4866 | + } |
4867 | + |
4868 | + var url = "/visitor?email="+email; |
4869 | + |
4870 | + $.getJSON(url, function(results, status) { |
4871 | + if (status == "success") { |
4872 | + $("#subscribe_message").html('Muchas gracias.'); |
4873 | + } else { |
4874 | + alert("Hubo un problema. Por favor intentá más tarde."); |
4875 | + } |
4876 | + }); |
4877 | +}); |
4878 | + |
4879 | +function validateEmail(email) |
4880 | +{ |
4881 | + //var re = /\S+@\S+/; |
4882 | + var re =/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i |
4883 | + return re.test(email); |
4884 | +} |
4885 | +</script> </body> |
4886 | +</html> |
4887 | |
4888 | === added file 'tests/ej-encuen-program-3.html' |
4889 | --- tests/ej-encuen-program-3.html 1970-01-01 00:00:00 +0000 |
4890 | +++ tests/ej-encuen-program-3.html 2017-07-08 22:31:52 +0000 |
4891 | @@ -0,0 +1,1442 @@ |
4892 | +<!DOCTYPE html> |
4893 | +<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--> |
4894 | +<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--> |
4895 | +<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--> |
4896 | +<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--> |
4897 | +<!--[if gt IE 9]><!--> |
4898 | +<!--[if lte IE 9]> |
4899 | + <link href='/frontend/css/animations-ie-fix.css' rel='stylesheet'> |
4900 | +<![endif]--> |
4901 | +<html class="no-js" lang="en"> |
4902 | +<!--<![endif]--> |
4903 | +<head> |
4904 | +<meta charset="UTF-8" /> |
4905 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
4906 | +<!-- Twitter Card data --> |
4907 | +<meta name="twitter:site" content="@canalencuentro"> |
4908 | +<meta name="twitter:title" content="Serie El orden"> |
4909 | +<!-- Twitter summary card with large image must be at least 280x150px --> |
4910 | +<meta name="twitter:image:src" content="http://encuentro.gob.ar/files/mentira_la_verdad_360x360.jpg"> |
4911 | + |
4912 | +<!-- Open Graph data --> |
4913 | +<meta property="og:title" content="Serie El orden" /> |
4914 | +<meta property="og:type" content="video" /> |
4915 | +<meta property="og:url" content="http://encuentro.gob.ar/programas/series/295" /> |
4916 | +<meta property="og:image" content="http://encuentro.gob.ar/files/mentira_la_verdad_360x360.jpg" /> |
4917 | +<meta property="og:site_name" content="Canal Encuentro" /> |
4918 | +<title>Mentira la verdad (T1), El orden - Canal Encuentro</title> |
4919 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
4920 | +<link href='https://fonts.googleapis.com/css?family=Asap:400,400italic,700,700italic' rel='stylesheet' type='text/css'> |
4921 | +<link rel="stylesheet" type="text/css" href="/frontend/css/encuentro.css" /> |
4922 | +<!-- <link rel="shortcut icon" href="/images/favicon.ico?v=2"> --> |
4923 | +<link rel="shortcut icon" href="/images/favicon.png?v=3"> |
4924 | +<!-- REVOLUTION STYLE SHEETS --> |
4925 | +<link rel="stylesheet" type="text/css" href="/frontend/css/settings.css"> |
4926 | +<!-- REVOLUTION LAYERS STYLES --> |
4927 | +<link rel="stylesheet" type="text/css" href="/frontend/css/layers.css"> |
4928 | +<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
4929 | +<script src="/frontend/js/menu.js"></script> |
4930 | +<script src="/frontend/js/modernizr.min.js"></script> |
4931 | +<script src="/frontend/js/bootstrap.js"></script> |
4932 | + |
4933 | +<!-- REVOLUTION JS FILES --> |
4934 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.tools.min.js"></script> |
4935 | +<script type="text/javascript" src="/frontend/js/jquery.themepunch.revolution.min.js"></script> |
4936 | + |
4937 | +<script type="text/javascript"> |
4938 | +<!-- |
4939 | +function viewport() |
4940 | +{ |
4941 | +var e = window |
4942 | +, a = 'inner'; |
4943 | +if ( !( 'innerWidth' in window ) ) |
4944 | +{ |
4945 | +a = 'client'; |
4946 | +e = document.documentElement || document.body; |
4947 | +} |
4948 | +return { width : e[ a+'Width' ] , height : e[ a+'Height' ] } |
4949 | +} |
4950 | +//--> |
4951 | +</script> |
4952 | +<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-1463165-1', 'auto');ga('set', 'anonymizeIp', true);ga('send', 'pageview');</script></head> |
4953 | + |
4954 | +<script> |
4955 | +$( document ).ready(function() { |
4956 | + //trackeo para analytics |
4957 | + $("a.ga_encuentro_track").click(function(e) { |
4958 | + var ga_category = $(e.currentTarget).data('ga_category'); |
4959 | + var ga_action = $(e.currentTarget).data('ga_action'); |
4960 | + var ga_label = $(e.currentTarget).data('ga_label'); |
4961 | + |
4962 | + encuentroTrackAnalytics(ga_category, ga_action, ga_label); |
4963 | + }); |
4964 | +}); |
4965 | + |
4966 | +//hago esta funcion para poder usarla desde otros lugares tambien |
4967 | +function encuentroTrackAnalytics(ga_category, ga_action, ga_label){ |
4968 | + if(typeof dondeEstoy !== 'undefined' && dondeEstoy != null){ |
4969 | + ga_category = dondeEstoy; |
4970 | + } |
4971 | + |
4972 | + ga('send', 'event', ga_category, ga_action, ga_label); |
4973 | +} |
4974 | +</script> <body> |
4975 | + <div id="wrap"> |
4976 | + <header> |
4977 | + <div class="menu"> |
4978 | + <div class="col-xs-2"> |
4979 | + <a href="/"> |
4980 | + <div class="logo"></div> |
4981 | + </a> |
4982 | + </div> |
4983 | + <div class="col-xs-2 section-m">Catálogo</div> |
4984 | + <div class="col-xs-9"> |
4985 | + <div class="search-mov"> |
4986 | + <div class="dropdown"> |
4987 | + <div class="btn btn-default dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" role="button"> |
4988 | + <p class="icon-search"></p> |
4989 | + </div> |
4990 | + <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
4991 | + <li> |
4992 | + <form action="/search/" class="navbar-form"> |
4993 | + <div class="form-group"> |
4994 | + <input type="text" name="keywords" class="form-control" placeholder=""> |
4995 | + </div> |
4996 | + <button type="submit" class="btn btn-default"> |
4997 | + <span class="icon-right-open"></span> |
4998 | + </button> |
4999 | + </form> |
5000 | + </li> |
The diff has been truncated for viewing.