bin
images
plugins
archiver
disk_usage
favorites
file_properties
movie_tv_info
searcher
template
trasher
vod_thumbnailer
youtube_download
yt_dlp
downloader
extractor
anvato_token_generator
__init__.py
abc.py
abcnews.py
abcotvs.py
academicearth.py
acast.py
adn.py
adobeconnect.py
adobepass.py
adobetv.py
adultswim.py
aenetworks.py
afreecatv.py
airmozilla.py
aliexpress.py
aljazeera.py
allocine.py
alphaporno.py
alura.py
amara.py
amazon.py
amcnetworks.py
americastestkitchen.py
amp.py
animelab.py
animeondemand.py
anvato.py
aol.py
apa.py
aparat.py
appleconnect.py
applepodcasts.py
appletrailers.py
archiveorg.py
arcpublishing.py
ard.py
arkena.py
arnes.py
arte.py
asiancrush.py
atresplayer.py
atttechchannel.py
atvat.py
audimedia.py
audioboom.py
audiomack.py
audius.py
awaan.py
aws.py
azmedien.py
baidu.py
bandaichannel.py
bandcamp.py
bannedvideo.py
bbc.py
beatport.py
beeg.py
behindkink.py
bellmedia.py
bet.py
bfi.py
bfmtv.py
bibeltv.py
bigflix.py
bild.py
bilibili.py
biobiochiletv.py
biqle.py
bitchute.py
bitwave.py
blackboardcollaborate.py
bleacherreport.py
blinkx.py
blogger.py
bloomberg.py
bokecc.py
bongacams.py
bostonglobe.py
box.py
bpb.py
br.py
bravotv.py
breakcom.py
breitbart.py
brightcove.py
businessinsider.py
buzzfeed.py
byutv.py
c56.py
cableav.py
callin.py
cam4.py
camdemy.py
cammodels.py
camwithher.py
canalalpha.py
canalc2.py
canalplus.py
canvas.py
carambatv.py
cartoonnetwork.py
cbc.py
cbs.py
cbsinteractive.py
cbslocal.py
cbsnews.py
cbssports.py
ccc.py
ccma.py
cctv.py
cda.py
ceskatelevize.py
cgtn.py
channel9.py
charlierose.py
chaturbate.py
chilloutzone.py
chingari.py
chirbit.py
cinchcast.py
cinemax.py
ciscolive.py
ciscowebex.py
cjsw.py
cliphunter.py
clippit.py
cliprs.py
clipsyndicate.py
closertotruth.py
cloudflarestream.py
cloudy.py
clubic.py
clyp.py
cmt.py
cnbc.py
cnn.py
comedycentral.py
common.py
commonmistakes.py
commonprotocols.py
condenast.py
contv.py
corus.py
coub.py
cozytv.py
cracked.py
crackle.py
crooksandliars.py
crowdbunker.py
crunchyroll.py
cspan.py
ctsnews.py
ctv.py
ctvnews.py
cultureunplugged.py
curiositystream.py
cwtv.py
daftsex.py
dailymail.py
dailymotion.py
damtomo.py
daum.py
dbtv.py
dctp.py
deezer.py
defense.py
democracynow.py
dfb.py
dhm.py
digg.py
digitalconcerthall.py
digiteka.py
discovery.py
discoverygo.py
discoveryvr.py
disney.py
dispeak.py
dlive.py
doodstream.py
dotsub.py
douyutv.py
dplay.py
drbonanza.py
dreisat.py
drooble.py
dropbox.py
dropout.py
drtuber.py
drtv.py
dtube.py
duboku.py
dumpert.py
dvtv.py
dw.py
eagleplatform.py
ebaumsworld.py
echomsk.py
egghead.py
ehow.py
eighttracks.py
einthusan.py
eitb.py
ellentube.py
elonet.py
elpais.py
embedly.py
engadget.py
epicon.py
eporner.py
eroprofile.py
ertgr.py
escapist.py
espn.py
esri.py
europa.py
europeantour.py
euscreen.py
everyonesmixtape.py
expotv.py
expressen.py
extractors.py
extremetube.py
eyedotv.py
facebook.py
fancode.py
faz.py
fc2.py
fczenit.py
filmmodu.py
filmon.py
filmweb.py
firsttv.py
fivemin.py
fivetv.py
flickr.py
folketinget.py
footyroom.py
formula1.py
fourtube.py
fox.py
fox9.py
foxgay.py
foxnews.py
foxsports.py
franceculture.py
franceinter.py
francetv.py
freesound.py
freespeech.py
freshlive.py
frontendmasters.py
fujitv.py
funimation.py
funk.py
fusion.py
fxnetworks.py
gab.py
gaia.py
gameinformer.py
gamejolt.py
gamespot.py
gamestar.py
gaskrank.py
gazeta.py
gdcvault.py
gedidigital.py
generic.py
gettr.py
gfycat.py
giantbomb.py
giga.py
gigya.py
glide.py
globo.py
glomex.py
go.py
godtube.py
gofile.py
golem.py
googledrive.py
googlepodcasts.py
googlesearch.py
gopro.py
goshgay.py
gotostage.py
gputechconf.py
gronkh.py
groupon.py
hbo.py
hearthisat.py
heise.py
hellporno.py
helsinki.py
hentaistigma.py
hgtv.py
hidive.py
historicfilms.py
hitbox.py
hitrecord.py
hketv.py
hornbunny.py
hotnewhiphop.py
hotstar.py
howcast.py
howstuffworks.py
hrfensehen.py
hrti.py
hse.py
huajiao.py
huffpost.py
hungama.py
hypem.py
ichinanalive.py
ign.py
iheart.py
imdb.py
imggaming.py
imgur.py
ina.py
inc.py
indavideo.py
infoq.py
instagram.py
internazionale.py
internetvideoarchive.py
iprima.py
iqiyi.py
ir90tv.py
itv.py
ivi.py
ivideon.py
iwara.py
izlesene.py
jamendo.py
jeuxvideo.py
joj.py
jove.py
jwplatform.py
kakao.py
kaltura.py
kanalplay.py
kankan.py
karaoketv.py
karrierevideos.py
keezmovies.py
kelbyone.py
ketnet.py
khanacademy.py
kickstarter.py
kinja.py
kinopoisk.py
konserthusetplay.py
koo.py
krasview.py
ku6.py
kusi.py
kuwo.py
la7.py
laola1tv.py
lazy_extractors.py
lbry.py
lci.py
lcp.py
lecture2go.py
lecturio.py
leeco.py
lego.py
lemonde.py
lenta.py
libraryofcongress.py
libsyn.py
lifenews.py
limelight.py
line.py
linkedin.py
linuxacademy.py
litv.py
livejournal.py
livestream.py
lnkgo.py
localnews8.py
lovehomeporn.py
lrt.py
lynda.py
m6.py
magentamusik360.py
mailru.py
mainstreaming.py
malltv.py
mangomolo.py
manoto.py
manyvids.py
maoritv.py
markiza.py
massengeschmacktv.py
matchtv.py
mdr.py
medaltv.py
mediaite.py
mediaklikk.py
medialaan.py
mediaset.py
mediasite.py
medici.py
megaphone.py
megatvcom.py
meipai.py
melonvod.py
meta.py
metacafe.py
metacritic.py
mgoon.py
mgtv.py
miaopai.py
microsoftstream.py
microsoftvirtualacademy.py
mildom.py
minds.py
ministrygrid.py
minoto.py
miomio.py
mirrativ.py
mit.py
mitele.py
mixch.py
mixcloud.py
mlb.py
mlssoccer.py
mnet.py
moevideo.py
mofosex.py
mojvideo.py
morningstar.py
motherless.py
motorsport.py
movieclips.py
moviezine.py
movingimage.py
msn.py
mtv.py
muenchentv.py
musescore.py
musicdex.py
mwave.py
mxplayer.py
mychannels.py
myspace.py
myspass.py
myvi.py
myvideoge.py
myvidster.py
n1.py
nate.py
nationalgeographic.py
naver.py
nba.py
nbc.py
ndr.py
ndtv.py
nebula.py
nerdcubed.py
neteasemusic.py
netzkino.py
newgrounds.py
newstube.py
newsy.py
nextmedia.py
nexx.py
nfhsnetwork.py
nfl.py
nhk.py
nhl.py
nick.py
niconico.py
ninecninemedia.py
ninegag.py
ninenow.py
nintendo.py
nitter.py
njpwworld.py
nobelprize.py
noco.py
nonktube.py
noodlemagazine.py
noovo.py
normalboots.py
nosvideo.py
nova.py
novaplay.py
nowness.py
noz.py
npo.py
npr.py
nrk.py
nrl.py
ntvcojp.py
ntvde.py
ntvru.py
nuevo.py
nuvid.py
nytimes.py
nzherald.py
nzz.py
odatv.py
odnoklassniki.py
oktoberfesttv.py
olympics.py
on24.py
once.py
ondemandkorea.py
onefootball.py
onet.py
onionstudios.py
ooyala.py
opencast.py
openload.py
openrec.py
ora.py
orf.py
outsidetv.py
packtpub.py
palcomp3.py
pandoratv.py
paramountplus.py
parliamentliveuk.py
parlview.py
patreon.py
pbs.py
pearvideo.py
peertube.py
peertv.py
peloton.py
people.py
performgroup.py
periscope.py
philharmoniedeparis.py
phoenix.py
photobucket.py
picarto.py
piksel.py
pinkbike.py
pinterest.py
pixivsketch.py
pladform.py
planetmarathi.py
platzi.py
playfm.py
playplustv.py
plays.py
playstuff.py
playtvak.py
playvid.py
playwire.py
pluralsight.py
plutotv.py
podomatic.py
pokemon.py
pokergo.py
polsatgo.py
polskieradio.py
popcorntimes.py
popcorntv.py
porn91.py
porncom.py
pornez.py
pornflip.py
pornhd.py
pornhub.py
pornotube.py
pornovoisines.py
pornoxo.py
presstv.py
projectveritas.py
prosiebensat1.py
prx.py
puhutv.py
puls4.py
pyvideo.py
qqmusic.py
r7.py
radiko.py
radiobremen.py
radiocanada.py
radiode.py
radiofrance.py
radiojavan.py
radiokapital.py
radiozet.py
radlive.py
rai.py
raywenderlich.py
rbmaradio.py
rcs.py
rcti.py
rds.py
redbulltv.py
reddit.py
redgifs.py
redtube.py
regiotv.py
rentv.py
restudy.py
reuters.py
reverbnation.py
rice.py
rmcdecouverte.py
ro220.py
rockstargames.py
roosterteeth.py
rottentomatoes.py
roxwel.py
rozhlas.py
rtbf.py
rte.py
rtl2.py
rtlnl.py
rtnews.py
rtp.py
rtrfm.py
rts.py
rtve.py
rtvnh.py
rtvs.py
ruhd.py
rule34video.py
rumble.py
rutube.py
rutv.py
ruutu.py
ruv.py
safari.py
saitosan.py
samplefocus.py
sapo.py
savefrom.py
sbs.py
screencast.py
screencastomatic.py
scrippsnetworks.py
scte.py
seeker.py
senategov.py
sendtonews.py
servus.py
sevenplus.py
sexu.py
seznamzpravy.py
shahid.py
shared.py
shemaroome.py
showroomlive.py
simplecast.py
sina.py
sixplay.py
skeb.py
sky.py
skyit.py
skylinewebcams.py
skynewsarabia.py
skynewsau.py
slideshare.py
slideslive.py
slutload.py
snotr.py
sohu.py
sonyliv.py
soundcloud.py
soundgasm.py
southpark.py
sovietscloset.py
spankbang.py
spankwire.py
spiegel.py
spiegeltv.py
spike.py
sport5.py
sportbox.py
sportdeutschland.py
spotify.py
spreaker.py
springboardplatform.py
sprout.py
srgssr.py
srmediathek.py
stanfordoc.py
startv.py
steam.py
stitcher.py
storyfire.py
streamable.py
streamanity.py
streamcloud.py
streamcz.py
streamff.py
streetvoice.py
stretchinternet.py
stripchat.py
stv.py
sunporno.py
sverigesradio.py
svt.py
swrmediathek.py
syfy.py
sztvhu.py
tagesschau.py
tass.py
tastytrade.py
tbs.py
tdslifeway.py
teachable.py
teachertube.py
teachingchannel.py
teamcoco.py
teamtreehouse.py
techtalks.py
ted.py
tele13.py
tele5.py
telebruxelles.py
telecinco.py
telegraaf.py
telemb.py
telemundo.py
telequebec.py
teletask.py
telewebion.py
tennistv.py
tenplay.py
testurl.py
tf1.py
tfo.py
theintercept.py
theplatform.py
thescene.py
thestar.py
thesun.py
theta.py
theweatherchannel.py
thisamericanlife.py
thisav.py
thisoldhouse.py
threeqsdn.py
threespeak.py
tiktok.py
tinypic.py
tmz.py
tnaflix.py
toggle.py
toggo.py
tokentube.py
tonline.py
toongoggles.py
toutv.py
toypics.py
traileraddict.py
trilulilu.py
trovo.py
trueid.py
trunews.py
trutv.py
tube8.py
tubitv.py
tudou.py
tumblr.py
tunein.py
tunepk.py
turbo.py
turner.py
tv2.py
tv2dk.py
tv2hu.py
tv4.py
tv5mondeplus.py
tv5unis.py
tva.py
tvanouvelles.py
tvc.py
tver.py
tvigle.py
tvland.py
tvn24.py
tvnet.py
tvnoe.py
tvnow.py
tvopengr.py
tvp.py
tvplay.py
tvplayer.py
tweakers.py
twentyfourvideo.py
twentymin.py
twentythreevideo.py
twitcasting.py
twitch.py
twitter.py
udemy.py
udn.py
ufctv.py
ukcolumn.py
uktvplay.py
umg.py
unistra.py
unity.py
uol.py
uplynk.py
urort.py
urplay.py
usanetwork.py
usatoday.py
ustream.py
ustudio.py
utreon.py
varzesh3.py
vbox7.py
veehd.py
veo.py
veoh.py
vesti.py
vevo.py
vgtv.py
vh1.py
vice.py
vidbit.py
viddler.py
videa.py
videodetective.py
videofyme.py
videomore.py
videopress.py
vidio.py
vidlii.py
vidzi.py
vier.py
viewlift.py
viidea.py
viki.py
vimeo.py
vimm.py
vimple.py
vine.py
viqeo.py
viu.py
vk.py
vlive.py
vodlocker.py
vodpl.py
vodplatform.py
voicerepublic.py
voicy.py
voot.py
voxmedia.py
vrak.py
vrt.py
vrv.py
vshare.py
vtm.py
vube.py
vuclip.py
vupload.py
vvvvid.py
vyborymos.py
vzaar.py
wakanim.py
walla.py
washingtonpost.py
wat.py
watchbox.py
watchindianporn.py
wdr.py
webcaster.py
webofstories.py
weibo.py
weiqitv.py
whowatch.py
willow.py
wimtv.py
wistia.py
worldstarhiphop.py
wppilot.py
wsj.py
wwe.py
xbef.py
xboxclips.py
xfileshare.py
xhamster.py
xiami.py
ximalaya.py
xminus.py
xnxx.py
xstream.py
xtube.py
xuite.py
xvideos.py
xxxymovies.py
yahoo.py
yandexdisk.py
yandexmusic.py
yandexvideo.py
yapfiles.py
yesjapan.py
yinyuetai.py
ynet.py
youjizz.py
youku.py
younow.py
youporn.py
yourporn.py
yourupload.py
youtube.py
zapiks.py
zaq1.py
zattoo.py
zdf.py
zee5.py
zhihu.py
zingmp3.py
zoom.py
zype.py
postprocessor
YoutubeDL.py
__init__.py
__main__.py
aes.py
cache.py
compat.py
cookies.py
jsinterp.py
minicurses.py
options.py
socks.py
update.py
utils.py
version.py
webvtt.py
yt_dlp-2022.2.4.dist-info
__init__.py
__main__.py
download.sh
manifest.json
plugin.py
README.md
src
user_config
.gitignore
LICENSE
README.md
234 lines
9.1 KiB
Python
234 lines
9.1 KiB
Python
# coding: utf-8
|
|
from __future__ import unicode_literals
|
|
|
|
import base64
|
|
import hashlib
|
|
import json
|
|
import random
|
|
import re
|
|
|
|
from .common import InfoExtractor
|
|
from ..compat import (
|
|
compat_str,
|
|
)
|
|
from ..utils import (
|
|
HEADRequest,
|
|
ExtractorError,
|
|
float_or_none,
|
|
orderedSet,
|
|
str_or_none,
|
|
try_get,
|
|
)
|
|
|
|
|
|
class GloboIE(InfoExtractor):
|
|
_VALID_URL = r'(?:globo:|https?://.+?\.globo\.com/(?:[^/]+/)*(?:v/(?:[^/]+/)?|videos/))(?P<id>\d{7,})'
|
|
_NETRC_MACHINE = 'globo'
|
|
_TESTS = [{
|
|
'url': 'http://g1.globo.com/carros/autoesporte/videos/t/exclusivos-do-g1/v/mercedes-benz-gla-passa-por-teste-de-colisao-na-europa/3607726/',
|
|
'info_dict': {
|
|
'id': '3607726',
|
|
'ext': 'mp4',
|
|
'title': 'Mercedes-Benz GLA passa por teste de colisão na Europa',
|
|
'duration': 103.204,
|
|
'uploader': 'G1',
|
|
'uploader_id': '2015',
|
|
},
|
|
'params': {
|
|
'skip_download': True,
|
|
},
|
|
}, {
|
|
'url': 'http://globoplay.globo.com/v/4581987/',
|
|
'info_dict': {
|
|
'id': '4581987',
|
|
'ext': 'mp4',
|
|
'title': 'Acidentes de trânsito estão entre as maiores causas de queda de energia em SP',
|
|
'duration': 137.973,
|
|
'uploader': 'Rede Globo',
|
|
'uploader_id': '196',
|
|
},
|
|
'params': {
|
|
'skip_download': True,
|
|
},
|
|
}, {
|
|
'url': 'http://canalbrasil.globo.com/programas/sangue-latino/videos/3928201.html',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'http://globosatplay.globo.com/globonews/v/4472924/',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'http://globotv.globo.com/t/programa/v/clipe-sexo-e-as-negas-adeus/3836166/',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'http://globotv.globo.com/canal-brasil/sangue-latino/t/todos-os-videos/v/ator-e-diretor-argentino-ricado-darin-fala-sobre-utopias-e-suas-perdas/3928201/',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'http://canaloff.globo.com/programas/desejar-profundo/videos/4518560.html',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'globo:3607726',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'https://globoplay.globo.com/v/10248083/',
|
|
'info_dict': {
|
|
'id': '10248083',
|
|
'ext': 'mp4',
|
|
'title': 'Melhores momentos: Equador 1 x 1 Brasil pelas Eliminatórias da Copa do Mundo 2022',
|
|
'duration': 530.964,
|
|
'uploader': 'SporTV',
|
|
'uploader_id': '698',
|
|
},
|
|
'params': {
|
|
'skip_download': True,
|
|
},
|
|
}]
|
|
|
|
def _real_extract(self, url):
|
|
video_id = self._match_id(url)
|
|
|
|
self._request_webpage(
|
|
HEADRequest('https://globo-ab.globo.com/v2/selected-alternatives?experiments=player-isolated-experiment-02&skipImpressions=true'),
|
|
video_id, 'Getting cookies')
|
|
|
|
video = self._download_json(
|
|
'http://api.globovideos.com/videos/%s/playlist' % video_id,
|
|
video_id)['videos'][0]
|
|
if not self.get_param('allow_unplayable_formats') and video.get('encrypted') is True:
|
|
self.report_drm(video_id)
|
|
|
|
title = video['title']
|
|
|
|
formats = []
|
|
security = self._download_json(
|
|
'https://playback.video.globo.com/v2/video-session', video_id, 'Downloading security hash for %s' % video_id,
|
|
headers={'content-type': 'application/json'}, data=json.dumps({
|
|
"player_type": "desktop",
|
|
"video_id": video_id,
|
|
"quality": "max",
|
|
"content_protection": "widevine",
|
|
"vsid": "581b986b-4c40-71f0-5a58-803e579d5fa2",
|
|
"tz": "-3.0:00"
|
|
}).encode())
|
|
|
|
self._request_webpage(HEADRequest(security['sources'][0]['url_template']), video_id, 'Getting locksession cookie')
|
|
|
|
security_hash = security['sources'][0]['token']
|
|
if not security_hash:
|
|
message = security.get('message')
|
|
if message:
|
|
raise ExtractorError(
|
|
'%s returned error: %s' % (self.IE_NAME, message), expected=True)
|
|
|
|
hash_code = security_hash[:2]
|
|
padding = '%010d' % random.randint(1, 10000000000)
|
|
if hash_code in ('04', '14'):
|
|
received_time = security_hash[3:13]
|
|
received_md5 = security_hash[24:]
|
|
hash_prefix = security_hash[:23]
|
|
elif hash_code in ('02', '12', '03', '13'):
|
|
received_time = security_hash[2:12]
|
|
received_md5 = security_hash[22:]
|
|
padding += '1'
|
|
hash_prefix = '05' + security_hash[:22]
|
|
|
|
padded_sign_time = compat_str(int(received_time) + 86400) + padding
|
|
md5_data = (received_md5 + padded_sign_time + '0xAC10FD').encode()
|
|
signed_md5 = base64.urlsafe_b64encode(hashlib.md5(md5_data).digest()).decode().strip('=')
|
|
signed_hash = hash_prefix + padded_sign_time + signed_md5
|
|
source = security['sources'][0]['url_parts']
|
|
resource_url = source['scheme'] + '://' + source['domain'] + source['path']
|
|
signed_url = '%s?h=%s&k=html5&a=%s' % (resource_url, signed_hash, 'F' if video.get('subscriber_only') else 'A')
|
|
|
|
formats.extend(self._extract_m3u8_formats(
|
|
signed_url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False))
|
|
self._sort_formats(formats)
|
|
|
|
subtitles = {}
|
|
for resource in video['resources']:
|
|
if resource.get('type') == 'subtitle':
|
|
subtitles.setdefault(resource.get('language') or 'por', []).append({
|
|
'url': resource.get('url'),
|
|
})
|
|
subs = try_get(security, lambda x: x['source']['subtitles'], expected_type=dict) or {}
|
|
for sub_lang, sub_url in subs.items():
|
|
if sub_url:
|
|
subtitles.setdefault(sub_lang or 'por', []).append({
|
|
'url': sub_url,
|
|
})
|
|
subs = try_get(security, lambda x: x['source']['subtitles_webvtt'], expected_type=dict) or {}
|
|
for sub_lang, sub_url in subs.items():
|
|
if sub_url:
|
|
subtitles.setdefault(sub_lang or 'por', []).append({
|
|
'url': sub_url,
|
|
})
|
|
|
|
duration = float_or_none(video.get('duration'), 1000)
|
|
uploader = video.get('channel')
|
|
uploader_id = str_or_none(video.get('channel_id'))
|
|
|
|
return {
|
|
'id': video_id,
|
|
'title': title,
|
|
'duration': duration,
|
|
'uploader': uploader,
|
|
'uploader_id': uploader_id,
|
|
'formats': formats,
|
|
'subtitles': subtitles,
|
|
}
|
|
|
|
|
|
class GloboArticleIE(InfoExtractor):
|
|
_VALID_URL = r'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/.]+)(?:\.html)?'
|
|
|
|
_VIDEOID_REGEXES = [
|
|
r'\bdata-video-id=["\'](\d{7,})',
|
|
r'\bdata-player-videosids=["\'](\d{7,})',
|
|
r'\bvideosIDs\s*:\s*["\']?(\d{7,})',
|
|
r'\bdata-id=["\'](\d{7,})',
|
|
r'<div[^>]+\bid=["\'](\d{7,})',
|
|
]
|
|
|
|
_TESTS = [{
|
|
'url': 'http://g1.globo.com/jornal-nacional/noticia/2014/09/novidade-na-fiscalizacao-de-bagagem-pela-receita-provoca-discussoes.html',
|
|
'info_dict': {
|
|
'id': 'novidade-na-fiscalizacao-de-bagagem-pela-receita-provoca-discussoes',
|
|
'title': 'Novidade na fiscalização de bagagem pela Receita provoca discussões',
|
|
'description': 'md5:c3c4b4d4c30c32fce460040b1ac46b12',
|
|
},
|
|
'playlist_count': 1,
|
|
}, {
|
|
'url': 'http://g1.globo.com/pr/parana/noticia/2016/09/mpf-denuncia-lula-marisa-e-mais-seis-na-operacao-lava-jato.html',
|
|
'info_dict': {
|
|
'id': 'mpf-denuncia-lula-marisa-e-mais-seis-na-operacao-lava-jato',
|
|
'title': "Lula era o 'comandante máximo' do esquema da Lava Jato, diz MPF",
|
|
'description': 'md5:8aa7cc8beda4dc71cc8553e00b77c54c',
|
|
},
|
|
'playlist_count': 6,
|
|
}, {
|
|
'url': 'http://gq.globo.com/Prazeres/Poder/noticia/2015/10/all-o-desafio-assista-ao-segundo-capitulo-da-serie.html',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'http://gshow.globo.com/programas/tv-xuxa/O-Programa/noticia/2014/01/xuxa-e-junno-namoram-muuuito-em-luau-de-zeze-di-camargo-e-luciano.html',
|
|
'only_matching': True,
|
|
}, {
|
|
'url': 'http://oglobo.globo.com/rio/a-amizade-entre-um-entregador-de-farmacia-um-piano-19946271',
|
|
'only_matching': True,
|
|
}]
|
|
|
|
@classmethod
|
|
def suitable(cls, url):
|
|
return False if GloboIE.suitable(url) else super(GloboArticleIE, cls).suitable(url)
|
|
|
|
def _real_extract(self, url):
|
|
display_id = self._match_id(url)
|
|
webpage = self._download_webpage(url, display_id)
|
|
video_ids = []
|
|
for video_regex in self._VIDEOID_REGEXES:
|
|
video_ids.extend(re.findall(video_regex, webpage))
|
|
entries = [
|
|
self.url_result('globo:%s' % video_id, GloboIE.ie_key())
|
|
for video_id in orderedSet(video_ids)]
|
|
title = self._og_search_title(webpage, fatal=False)
|
|
description = self._html_search_meta('description', webpage)
|
|
return self.playlist_result(entries, display_id, title, description)
|