#download_fb('du.txt', 1) #copy_to_remote(copied_file, remote_username, remote_pass, remote_hostname, remote_port, escaped_remote) ''' remote_username = '******' remote_pass = '******' remote_hostname = '192.168.1.36' escaped_remote = '/data/data/com.termux/files/home/storage/external-1/PahtamagyiGrade/' remote_port = 8022 #copy_to_remote('*.pdf', copy_to_remote('AshinTayzaniya-YamakaAhLinYaung-for-Pahtamagyigrade.pdf', remote_username, remote_pass, remote_hostname, remote_port, escaped_remote ) ''' def get_json(): playlist = 'Bokyaung page မွာ videos မ်ား' description_title = 'Bokyaung page မွာ videos မ်ား' source = '\nsource from https://www.facebook.com/pg/bokyaung/videos/' get_json_fb('titles.txt', 'results.txt', 'raw_json_title.txt', playlist, description_title, source) #titles_links.txt description.txt raw_json_title.txt #get_splited_lines('links.txt', 30) download_fb('links.txt', 3) #thread_upload('raw_json_title.txt', 1) #thread_upload_test('raw_json_title.txt') #thread_upload_test_title('raw_json_title.txt')
clearInterval(myVar); } ''' #rearrange_urls('raw_urls.txt', 'links.txt') #get_fb_title('links.txt', 'results.txt', 'finished.txt', 'geckodriver.exe') #download_fb('du.txt', 1) #copy_to_remote(copied_file, remote_username, remote_pass, remote_hostname, remote_port, escaped_remote) ''' remote_username = '******' remote_pass = '******' remote_hostname = '192.168.1.36' escaped_remote = '/data/data/com.termux/files/home/storage/external-1/PahtamagyiGrade/' remote_port = 8022 #copy_to_remote('*.pdf', copy_to_remote('AshinTayzaniya-YamakaAhLinYaung-for-Pahtamagyigrade.pdf', remote_username, remote_pass, remote_hostname, remote_port, escaped_remote ) ''' ''' playlist = 'Dhammalan Mdy page မွာ ေဒါက္တာစိုးလြင္ (မႏၲေလး) ၀ိသုဒၶိမဂ္ဓမၼလမ္း၀ိပႆနာသင္တန္း တရားေတာ္မ်ား' description_title = 'Dhammalan Mdy page မွာ ေဒါက္တာစိုးလြင္ (မႏၲေလး) ၀ိသုဒၶိမဂ္ဓမၼလမ္း၀ိပႆနာသင္တန္း တရားေတာ္မ်ား' source='\nsource from https://www.facebook.com/profile.php?id=100014194418570&lst=100007043114370%3A100014194418570%3A1555906860&sk=videos/' get_json_fb('titles.txt', 'results.txt', 'raw_json_title.txt',playlist, description_title, source) #titles_links.txt description.txt raw_json_title.txt ''' #get_splited_lines('links.txt', 30) download_fb('links.txt', 10) #thread_upload('raw_json_title.txt', 1) #thread_upload_test('raw_json_title.txt') #thread_upload_test_title('raw_json_title.txt')
except IndexError as e: threads = 1 def get_percent(): cmd = "df -h | grep media_rw | awk '{print $5}'" ps = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT) output = ps.communicate()[0].decode() print(output.split('%')[0]) return int(output.split('%')[0]) count = 0 for txt in range(0, 90): #count = 0 #print(count) #if count < 5: txt_file = '%s%s.txt' % (dir_path, txt) file_txt = '%s.txt' % (txt) if os.path.isfile(txt_file): if get_percent() <= 95 and count < 5: print(txt_file) download_fb(file_txt, int(threads)) #print(txt_file) count += 1 else: break
#fb ''' var myVar = setInterval(function(){window.scrollTo(0, document.body.scrollHeight);}, 10000); clearInterval(myVar); function myTimer() { window.scrollTo(0, document.body.scrollHeight); } function myStopFunction() { clearInterval(myVar); } ''' #rearrange_urls('fb_links.txt', 'links.txt') #get_fb_title('links.txt', 'results.txt', 'finished.txt', 'geckodriver.exe') download_fb('links.txt', 2) #copy_to_remote(copied_file, remote_username, remote_pass, remote_hostname, remote_port, escaped_remote) ''' remote_username = '******' remote_pass = '******' remote_hostname = '192.168.1.36' escaped_remote = '/data/data/com.termux/files/home/storage/external-1/PahtamagyiGrade/' remote_port = 8022 #copy_to_remote('*.pdf', copy_to_remote('AshinTayzaniya-YamakaAhLinYaung-for-Pahtamagyigrade.pdf', remote_username, remote_pass, remote_hostname, remote_port, escaped_remote ) ''' def get_json():
#full_path = os.path.realpath(__file__) #path, filename = os.path.split(full_path) #os.chdir(path) #dir_path = os.path.dirname(os.path.realpath(__file__)) #print(dir_path) #download_fb('44.txt', 1) #result = os.path.isfile(dir_path+'44.txt') #print(result) count = 0 for txt in range(1, 90): #count = 0 #print(count) #if count < 5: txt_file = '%s%s.txt' % (dir_path, txt) file_txt = '%s.txt' % (txt) if os.path.isfile(txt_file): if count < 5: print(txt_file) download_fb(file_txt, 1) #print(txt_file) count += 1 else: break #count += 1 #time.sleep(5)
cmd = "df -h | grep media_rw | awk '{print $5}'" ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = ps.communicate()[0].decode() print(output.split('%')[0]) return int(output.split('%')[0]) txt_file = '%s%s.txt' % (dir_path, 'links') print(txt_file) if os.path.isfile(txt_file): if get_percent() <= 95: print(txt_file) download_fb('links.txt', int(threads)) #print(txt_file) ''' count = 0 for txt in range(0, 90): #count = 0 #print(count) #if count < 5: txt_file = '%s%s.txt' % (dir_path, txt) file_txt = '%s.txt' % (txt) if os.path.isfile(txt_file): if get_percent() <= 95 and count < 5: print(txt_file) download_fb(file_txt, int(threads)) #print(txt_file) count += 1