示例#1
0
 def download(self,
              save_path='files/downloads',
              ext='mp4',
              res='720p',
              typ='video'):
     videos = self.video_links(all=1)
     with thread() as executor:
         save_path = [save_path] * len(videos)
         ext = [ext] * len(videos)
         res = [res] * len(videos)
         typ = [typ] * len(videos)
         executor.map(download_vid, videos, save_path, ext, res, typ)
示例#2
0
 def hapus_permintaan_pertemanan(self):
     count = 0
     while True:
         link = self.getLink(
             'https://free.facebook.com/friends/center/requests',
             'Hapus Permintaan')
         if len(link) != 0:
             with thread(max_workers=3) as thr:
                 for x in link:
                     thr.submit(self.start, (x))
                     count += 1
                     print(f'\r    -> {str(count)} Terhapus',
                           end='',
                           flush=True)
         else:
             print('    -! Permintaan Tidak Didapatkan')
             break
示例#3
0
 def unfriend(self):
     count = 0
     while True:
         konfir = []
         id = dump.Dump(self.cookie).user('/me', loop=False)
         if len(id) != 0:
             for x in id:
                 lainnya = self.getLink(self.head + '/' + x, 'Lainnya')
                 batalkan = self.getLink(self.head + lainnya[0],
                                         'Batalkan pertemanan')
                 konfir.append(batalkan[0])
             with thread(max_workers=10) as th:
                 for s in konfir:
                     th.submit(self.konfirmasi_penghapusan, (self.head + s))
                     count += 1
                     print(f'\r    -> {str(count)} Teman Telah Dihapus',
                           end='',
                           flush=True)
         else:
             print()
             print('\n    -! Teman Tidak Didapatkan')
示例#4
0
def specific_trim(vid_file, vid):
    try:
        print('''
        Please note that the trim intervals should be entered in the form of=> a b; c d; etc 
        that is from a to b trim it and from c to d trim it and so on 
        Also the the units should be in seconds
        ''')
        trim_intervals=input('Please enter the trim intervals here: ').split(';')
        a,b=trim_intervals[0].split(' ')
    except ValueError:
        try:
            print('Invalid Entry')
            trim_intervals=input('Please re-enter the trim intervals here: ').split(';')
            a,b=trim_intervals[0].split(' ')
        except:
            print('Error!!! closing program')
            return
    path = vid_folder()
    with thread() as executor:
        vid=[vid]*len(trim_intervals)
        path=[path]*len(trim_intervals)
        num = range(len(trim_intervals))
        # [executor.submit(_specific_trim_(trim_interval, vid)) for trim_interval in trim_intervals]
        executor.map(_specific_trim_,trim_intervals, vid, path, num)