pafy

how i can make thread for progress bar with pafy

扶醉桌前 提交于 2019-12-24 06:39:04
问题 i'm trying to fix problem in my program and this problem is when i start download video the program not responding and i can't see also progress bar move so i tried used threading module but i can't fix problem so how i can fix problem From this code I can download the video and send the data to another function to retrieve information that I use to connect it to the progress bar def video(self): video_url = self.lineEdit_4.text() video_save = self.lineEdit_3.text() pafy_video = pafy.new

How to connect node.js app with python script?

别来无恙 提交于 2019-12-08 11:48:10
问题 I've node app in Meteor.js and short python script using Pafy. import pafy url = "https://www.youtube.com/watch?v=AVQpGI6Tq0o" video = pafy.new(url) allstreams = video.allstreams for s in allstreams: print(s.mediatype, s.extension, s.quality, s.get_filesize(), s.url) What's the most effective way of connecting them so python script get url from node.js app and return back output to node.js? Would it be better to code it all in Python instead of Meteor.js? 回答1: Well, there are plenty of ways