Pesquisar na Comunidade
Mostrando resultados para as tags ''download videos''.
Encontrado 2 registros
-
[Python] - Informações e Download de vídeo do youtube
tarekvilela postou um tópico no fórum em Python
Programinha básico que mostra as informações sobre um vídeo do youtube e depois realiza o download se o usuário pedir. Será pedido a pasta de destino também. informações fornecidas: - Título - Autor - Duração - Visualizações - Likes - Dislikes - Rating - Descrição - Resolução e formato de todas as possibilidades - Melhor resolução e extensão - Oferece o download da melhor qualidade Uso o pacote pafy, se for um usuário UNIX, use: sudo pip install pafy Vídeo demonstrativo [Hidden Content] Código: # coding=UTF-8 import pafy url = raw_input("Url: ") video = pafy.new(url) t = video.title r = video.rating v = video.viewcount a = video.author d = video.duration g = video.likes dg = video.dislikes desc = video.description melhor = video.getbest() print "Título: " + str(t) print "Autor: " + str(a) print "Duração: " + str(d) print "Visualizações: " + str(v) print "Likes: " + str(g) print "Dislikes: " + str(dg) print "Rating: " + str(r) print "Descrição: " + str(desc) print "----------------------------------------" streams = video.streams for s in streams: print(s.resolution, s.extension, str(s.get_filesize()/(1024*1024)) + "mb") print "----------------------------------------" print "Melhor resulução: " + str(melhor.resolution) print "Melhor extensão de vídeo: " + str(melhor.extension) print("Quer realizar o download do vídeo? [" + str(melhor.get_filesize()/(1024*1024)) + "mb]") resposta = raw_input("[s/N] > ") if resposta == "s" or resposta == "S" or resposta == "sim" or resposta == "SIM": local = raw_input("Escolha uma pasta: ") melhor.download(quiet=False, filepath=local) print "Download concluído!" elif resposta == "n" or resposta == "N" or resposta == "Não" or resposta == "nao" or resposta == "NÃO": exit() else: exit()- 5 respostas
-
- 5
-
-
- download videos
- python
-
(e 1 mais)
Tags:
-
Precisa de: 1 WebBrowser 1 TextBox 8 Radio Button - Tambem pode fazer com ComboBox 5 Label 3 GroupBox 1 Timer 1 ContextMenuStrip - em Name coloque Download 1 ProgressBar em ContextMenuStrip add 2 opçao [ Baixar ] e [ Recarregar Pagina ] Clique na form e vai em ContextMenuStrip e vai ta " None " mude para " Download " Texto das Label: Label1 = URL do video Label2 = Status: Label3 = Formatos Label4 = Processo Label5 = 720 HD Monte seu Projeto : Exemplo: Depois de 2 Clique na Form e cole esse Codigo: Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load WebBrowser1.ScriptErrorsSuppressed = 1 WebBrowser1.Navigate("[Hidden Content]") End Sub Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged WebBrowser1.Document.GetElementById("extavi").InvokeMember("click") End Sub Private Sub TextBox1_DoubleClick(sender As Object, e As EventArgs) Handles TextBox1.DoubleClick WebBrowser1.Document.GetElementById("texturl").SetAttribute("value", (TextBox1.Text)) WebBrowser1.Document.GetElementById("convert1").InvokeMember("click") End Sub Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged WebBrowser1.Document.GetElementById("extmkv").InvokeMember("click") End Sub Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged WebBrowser1.Document.GetElementById("extwinmp4").InvokeMember("click") End Sub Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton4.CheckedChanged WebBrowser1.Document.GetElementById("extflv").InvokeMember("click") End Sub Private Sub RadioButton6_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton6.CheckedChanged WebBrowser1.Document.GetElementById("ext3gp").InvokeMember("click") End Sub Private Sub RadioButton9_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton9.CheckedChanged WebBrowser1.Document.GetElementById("extwmv").InvokeMember("click") End Sub Private Sub RadioButton5_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton5.CheckedChanged WebBrowser1.Document.GetElementById("extmpg").InvokeMember("click") End Sub Private Sub RadioButton7_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton7.CheckedChanged WebBrowser1.Document.GetElementById("extmov").InvokeMember("click") End Sub Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Timer1.Start() End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick On Error Resume Next Label2.Text = WebBrowser1.Document.GetElementById("divDownloadStatus").InnerText If Label2.Text.Contains("100% terminado") Then Timer1.Stop() Label2.Text = "Status:" Baixar.Enabled = True End If End Sub Private Sub WebBrowser1_ProgressChanged(sender As Object, e As WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged Try ProgressBar1.Value = CType(((e.CurrentProgress / e.MaximumProgress) * 100), Integer) GroupBox1.Enabled = True GroupBox2.Enabled = True Catch ex As Exception End Try End Sub Private Sub BaixarToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles Baixar.Click WebBrowser1.Document.GetElementById("downloada").InvokeMember("click") End Sub Private Sub RecarregarPaginaToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RecarregarPaginaToolStripMenuItem.Click WebBrowser1.Navigate("[Hidden Content]") End Sub Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) WebBrowser1.Document.GetElementById("videoResolution").InvokeMember("click") End Sub Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click WebBrowser1.Document.GetElementById("advanced-options-link").InvokeMember("click") MsgBox("O Video será baixado em 720 HD", MsgBoxStyle.Information, "") End Sub End Class Source: Scan:
-
- baixar videos vb
- download videos
- (e 2 mais)
