Creo que los pepes me están mareando y ya no se lo que hago.
A ver si me podéis orientar.
Esto probando en la función play y estoy atascado:
Código: Seleccionar todo
def play(item):
logger.info("[seriespepito.py] play")
itemlist=[]
print("## play item.url ####################################")
print(item.url)
print("#####################################################")
# Descarga pagina intermedia
data = scrapertools.cachePage(item.url, headers = PELICULASPEPITO_REQUEST_HEADERS)
# Extrae la nueva url
patron = '<tr><td><a class=".*?" target="_blank" href="(.*?)"><i class="icon-.*?"></i>.*?</a></td></tr>'
url = scrapertools.find_single_match(data,patron)
print("## play url #########################################")
print(url)
print("#####################################################")
# Extrae la url de 'Location: url' del header de respuesta
request = urllib2.Request(url)
request.add_header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0")
request.add_header("Accept-Encoding","gzip, deflate")
request.add_header("Accept-Language","es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3")
request.add_header("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
request.add_header("Connection","keep-alive")
request.add_header("Cookie","_ga=GA1.2.1377145840.1398328462")
request.add_header("Referer","http://www.enlacespepito.com/")
response = urllib2.urlopen(request)
url = response.geturl()
print("## play Location ####################################")
print(url)
print("#####################################################")
data = scrapertools.cache_page(url, headers = PELICULASPEPITO_REQUEST_HEADERS)
#print("## play data ########################################")
#print(data)
#print("#####################################################")
videoitemlist = servertools.find_video_items(data=data)
i=1
for videoitem in videoitemlist:
if not "favicon" in videoitem.url:
videoitem.title = "Mirror %d%s" % (i,videoitem.title)
videoitem.fulltitle = item.fulltitle
videoitem.channel=channel=__channel__
videoitem.show = item.show
itemlist.append(videoitem)
i=i+1
return itemlist
Log con videomega
Código: Seleccionar todo
11:59:47 T:1744 NOTICE: ## play item.url ####################################
11:59:47 T:1744 NOTICE: http://www.enlacespepito.com/abaa5f9f8a9fcefe25f2f0cf81ae2c4d/250357/ef86bada70b2d0b58e3c21650195102e/87b22299caeb53e4491ee8937368b40a/f5327320df754a727306d0c4b1262112acb4ef8ca54a547704c85a464b34c998/e1beb13340a813596ba87569b325ca67/3536a664f49d2d833b3e1a48f0300acd/181732230c19b815ce7015cdcb1dfca2cb719a96f0fe8af84805ec85adc693da/293048e573552cada7952a2ed345e6d43bc97e8b56a34fb78e8ddf9d11005098076d6602f39f9bd3b6a2838d212a37b6/4cfe50c12cc9892ca2eb7ce8fe9d2357/9a1c64bde53376202bb88122d326c00a/3d7eae712706ec33cc3a7566ac937114.html
11:59:47 T:1744 NOTICE: #####################################################
11:59:47 T:1744 NOTICE: send:
11:59:47 T:1744 NOTICE: 'GET /abaa5f9f8a9fcefe25f2f0cf81ae2c4d/250357/ef86bada70b2d0b58e3c21650195102e/87b22299caeb53e4491ee8937368b40a/f5327320df754a727306d0c4b1262112acb4ef8ca54a547704c85a464b34c998/e1beb13340a813596ba87569b325ca67/3536a664f49d2d833b3e1a48f0300acd/181732230c19b815ce7015cdcb1dfca2cb719a96f0fe8af84805ec85adc693da/293048e573552cada7952a2ed345e6d43bc97e8b56a34fb78e8ddf9d11005098076d6602f39f9bd3b6a2838d212a37b6/4cfe50c12cc9892ca2eb7ce8fe9d2357/9a1c64bde53376202bb88122d326c00a/3d7eae712706ec33cc3a7566ac937114.html HTTP/1.1\r\nAccept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip, deflate\r\nHost: www.enlacespepito.com\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0\r\nConnection: close\r\nReferer: \thttp://www.enlacespepito.com/\r\nCookie: _ga=GA1.2.1377145840.1398328462\r\n\r\n'
11:59:47 T:1744 NOTICE: reply:
11:59:47 T:1744 NOTICE: 'HTTP/1.1 200 OK\r\n'
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Date: Wed, 21 May 2014 09:59:52 GMT
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Server: Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e PHP/5.2.17
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: X-Powered-By: PHP/5.2.17
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Set-Cookie: visita=1; expires=Wed, 21-May-2014 10:09:52 GMT; path=/; domain=enlacespepito.com
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Connection: close
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Transfer-Encoding: chunked
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Content-Type: text/html
11:59:47 T:1744 NOTICE: ## play url #########################################
11:59:47 T:1744 NOTICE: http://www.enlacespepito.com/a567217d882440f6762ce866117707ab/1cae3a1d9023238d793a29c2a4cdb178cc9fcd1b8bb6b2bc3eb15d91636a68b484e200f82a39d797c5bb9abe3e4d30e0c37c64bb3a7cf3980.html
11:59:47 T:1744 NOTICE: #####################################################
11:59:47 T:1744 NOTICE: send:
11:59:47 T:1744 NOTICE: 'GET /a567217d882440f6762ce866117707ab/1cae3a1d9023238d793a29c2a4cdb178cc9fcd1b8bb6b2bc3eb15d91636a68b484e200f82a39d797c5bb9abe3e4d30e0c37c64bb3a7cf3980.html HTTP/1.1\r\nAccept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip, deflate\r\nHost: www.enlacespepito.com\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0\r\nConnection: close\r\nReferer: http://www.enlacespepito.com/\r\nCookie: _ga=GA1.2.1377145840.1398328462\r\n\r\n'
11:59:47 T:1744 NOTICE: reply:
11:59:47 T:1744 NOTICE: 'HTTP/1.1 302 Found\r\n'
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Date: Wed, 21 May 2014 09:59:52 GMT
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Server: Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e PHP/5.2.17
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: X-Powered-By: PHP/5.2.17
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Location: http://videomega.tv/?ref=NZNCUSGgMc
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Content-Length: 0
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Connection: close
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Content-Type: text/html
11:59:47 T:1744 NOTICE: send:
11:59:47 T:1744 NOTICE: 'GET /?ref=NZNCUSGgMc HTTP/1.1\r\nAccept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip, deflate\r\nHost: videomega.tv\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0\r\nConnection: close\r\nReferer: http://www.enlacespepito.com/\r\nCookie: _ga=GA1.2.1377145840.1398328462\r\n\r\n'
11:59:47 T:1744 NOTICE: reply:
11:59:47 T:1744 NOTICE: 'HTTP/1.1 200 OK\r\n'
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Server: cloudflare-nginx
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Date: Wed, 21 May 2014 09:59:51 GMT
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Content-Type: text/html; charset=UTF-8
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Transfer-Encoding: chunked
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Connection: close
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Set-Cookie: __cfduid=da8da1eeddb72f4a9fbe66a62aebb8a391400666391968; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.videomega.tv; HttpOnly
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: X-Powered-By: PHP/5.3.3
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: CF-RAY: 12dfec75ce60014d-CDG
11:59:47 T:1744 NOTICE: header:
11:59:47 T:1744 NOTICE: Content-Encoding: gzip
11:59:47 T:1744 NOTICE: ## play Location ####################################
11:59:47 T:1744 NOTICE: http://videomega.tv/?ref=NZNCUSGgMc
11:59:47 T:1744 NOTICE: #####################################################
11:59:47 T:1744 NOTICE: send:
11:59:47 T:1744 NOTICE: 'GET /?ref=NZNCUSGgMc HTTP/1.1\r\nAccept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip, deflate\r\nHost: videomega.tv\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0\r\nConnection: close\r\nReferer: \thttp://www.enlacespepito.com/\r\nCookie: _ga=GA1.2.1377145840.1398328462\r\n\r\n'
11:59:48 T:1744 NOTICE: reply:
11:59:48 T:1744 NOTICE: 'HTTP/1.1 200 OK\r\n'
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Server: cloudflare-nginx
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Date: Wed, 21 May 2014 09:59:52 GMT
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Content-Type: text/html; charset=UTF-8
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Transfer-Encoding: chunked
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Connection: close
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Set-Cookie: __cfduid=d17e2204de7c3dc131ee953be720643f71400666392131; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.videomega.tv; HttpOnly
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: X-Powered-By: PHP/5.3.3
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: CF-RAY: 12dfec76d70e014d-CDG
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Content-Encoding: gzip
11:59:48 T:1744 NOTICE: send:
11:59:48 T:1744 NOTICE: 'GET /iframe.php?ref=NZNCUSGgMc HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: videomega.tv\r\nCookie: __cfduid=d17e2204de7c3dc131ee953be720643f71400666392131\r\nConnection: close\r\nUser-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; es-ES; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12\r\n\r\n'
11:59:48 T:1744 NOTICE: reply:
11:59:48 T:1744 NOTICE: 'HTTP/1.1 200 OK\r\n'
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Server: cloudflare-nginx
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Date: Wed, 21 May 2014 09:59:52 GMT
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Content-Type: text/html; charset=UTF-8
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Transfer-Encoding: chunked
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Connection: close
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: X-Powered-By: PHP/5.3.3
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: CF-RAY: 12dfec789f3d014d-CDG
11:59:48 T:1744 NOTICE: send:
11:59:48 T:1744 NOTICE: 'GET /iframe.php?ref=NZNCUSGgMc HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: videomega.tv\r\nCookie: __cfduid=d17e2204de7c3dc131ee953be720643f71400666392131\r\nConnection: close\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3\r\n\r\n'
11:59:48 T:1744 NOTICE: reply:
11:59:48 T:1744 NOTICE: 'HTTP/1.1 200 OK\r\n'
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Server: cloudflare-nginx
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Date: Wed, 21 May 2014 09:59:52 GMT
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Content-Type: text/html; charset=UTF-8
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Transfer-Encoding: chunked
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: Connection: close
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: X-Powered-By: PHP/5.3.3
11:59:48 T:1744 NOTICE: header:
11:59:48 T:1744 NOTICE: CF-RAY: 12dfec7a081c014d-CDG
11:59:53 T:12224 NOTICE: DVDPlayer: Opening: http://st63.u1.videomega.tv/v/8691e4362fec5ff79f3d714e515f9cb6.mp4?st=1siwn_SzeAG8jeo1aOOCBQ&start=0
11:59:53 T:12224 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
11:59:53 T:3924 NOTICE: Thread CDVDPlayer start, auto delete: false
11:59:53 T:3924 NOTICE: Creating InputStream
11:59:53 T:3924 NOTICE: Creating Demuxer
11:59:53 T:200 NOTICE: Thread CFileCache start, auto delete: false
11:59:54 T:3924 NOTICE: Opening video stream: 0 source: 256
11:59:54 T:3924 NOTICE: Creating video codec with codec id: 28
11:59:54 T:3924 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
11:59:54 T:3924 NOTICE: Creating video thread
11:59:54 T:3924 NOTICE: Opening audio stream: 1 source: 256
11:59:54 T:3924 NOTICE: Finding audio codec for: 86018
11:59:54 T:7728 NOTICE: Thread CDVDPlayerVideo start, auto delete: false
11:59:54 T:7728 NOTICE: running thread: video_thread
11:59:54 T:3924 NOTICE: Creating audio thread
11:59:54 T:10308 NOTICE: Thread CDVDPlayerAudio start, auto delete: false
11:59:54 T:10308 NOTICE: running thread: CDVDPlayerAudio::Process()
11:59:54 T:10308 NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
11:59:54 T:7728 NOTICE: fps: 24.000000, pwidth: 720, pheight: 384, dwidth: 720, dheight: 384
11:59:55 T:7728 WARNING: CRenderManager::Configure - timeout waiting for previous frame
11:59:55 T:7728 NOTICE: Display resolution DESKTOP : 1920x1080 @ 60.00 - Full Screen (16)
11:59:55 T:7728 NOTICE: D3D: rendering method forced to DXVA2 processor
11:59:58 T:10308 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available