Spaces:
Building
Building
File size: 2,252 Bytes
29af131 7a811c7 29af131 3b90d58 4e350f0 1ef35c3 2a239be bd65db9 3b90d58 bd65db9 5e96886 3b90d58 5bdb975 53f25bc bd65db9 53f25bc e354b65 bd65db9 3b90d58 43ebf9d 9784d97 3b90d58 43ebf9d 9784d97 3b90d58 9784d97 abbd2d3 bd65db9 172a65f e8a9e3f abbd2d3 e8a9e3f abbd2d3 c58797e abbd2d3 b7a617c 5e96886 bd65db9 1dbb152 b7a617c 5e96886 bd65db9 5e96886 abcbc2c bd65db9 5e96886 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
import os
# os.system('pip install jedi')
# os.system('python -m pip install --upgrade pip setuptools wheel')
# os.system('python -m pip install lbry-libtorrent')
# os.system('apt-get install ffmpeg -y')
# os.system('apt install python3-libtorrent')
import streamlit as st
from streamlit_option_menu import option_menu
from others import *
from .torrent import *
option = ['Magnet Link', 'Index Torrent', 'Link Redirect', 'Kode']
# Navigasi Sidebar
with st.sidebar:
selected = option_menu("Torrent", option,
icons=['search', 'house', 'fire', 'water'], menu_icon="cast", default_index=0)
st.sidebar.image('DanMachi.png')
if selected == option[0]:
url = 'DanMachi.png'
st.image(url)
st.title(selected)
link = st.text_input("Masukkan Magnet Link", "")
search = link = st.text_input("Masukkan Pencarian", "")
extension = st.selectbox('Pilih Extension', ['.mp4', '.zip'])
if st.button("Trace On"):
info = torrent_info(link, search, extension)
file_priority = st.selectbox('Pilih File', info)
if st.button("Download"):
selected_index = int(file_priority.split('.')[0])
downloaded_files = torrent_download(link, [selected_index])
elif selected == option[1]:
st.title(selected)
teks = st.text_area("Masukkan Teks", '', height=(25 * 10))
tim = st.checkbox("Gak Perlu Dikelompokkan")
if tim:
group = 1000
else:
group = st.slider("Pilih Jumlah Group", min_value=1, max_value=25, value=5)
if st.button("Trace On"):
info = torrent_group(int(group), teks)
lokasi_file = simpan_txt('Group Torrent', info)
sesi(info, lokasi_file)
elif selected == option[2]:
st.title(selected)
link = st.text_input("Masukkan Link", "https://t.co/c31TBe7s4W")
if st.button("Trace On"):
info = link_redirect(link)
lokasi_file = simpan_txt('Group Torrent', info)
sesi(info, lokasi_file)
else:
st.title(selected)
link = st.text_input("Masukkan Link", "https://t.co/8Qes0WO3GV")
if st.button("Trace On"):
info = link_redirect(link)
info = format_info(info)
lokasi_file = simpan_txt('Group Torrent', info)
sesi(info, lokasi_file)
|