-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathiss.py
132 lines (112 loc) · 3.63 KB
/
iss.py
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
from __future__ import unicode_literals
from pytube import YouTube
from moviepy.editor import *
import os
import urllib.request
import youtube_dl
os.system("clear")
print("\033[92m")
os.system("figlet Sexettin Tool")
srum = open("surum.txt")
surum = srum.read()
print("\033[96m")
print('''
_,;_;/-",_
,") ( ((O) " .`,
,` ( ) ; -.,/;`}
," o ( ( ( . -_-.
`. ; ; ) ) \`; \;
`., ) ( ( _-` \,'
"`'-,,`.jb
1-) Videodan müziğe dönüştürücü
2-) Müzik indirici
3-) Video indirici
4-) Python dosyasını exe formatına dönüştür
5-) Dosya indirici
6-) Terminalde müzik aç
7-) Ana menüye dön
''')
iss = input("Hangisini seçiyorsun? ")
if(iss=="1"):
import os
os.system("pip install moviepy")
mp4_file = input("Video yolunu giriniz: ")
mp3_file = input("Müzik adını giriniz sonuna .mp3 ekleyerek: ")
videoClip = VideoFileClip(mp4_file)
audioclip = videoClip.audio
audioclip.write_audiofile(mp3_file)
audioclip.close()
videoClip.close()
elif(iss=="2"):
import yt_dlp
video_url = input("YouTube video URL'sini girin: ")
download_path = input("Müziği nereye indirmek istersiniz? (varsayılan olarak mevcut dizin): ")
if not download_path:
download_path = '.'
ydl_opts = {
'outtmpl': f'{download_path}/%(title)s.%(ext)s',
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
'postprocessor_args': [
'-ar', '16000'
],
}
try:
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
print("İndiriliyor...")
ydl.download([video_url])
print("İndirme ve dönüştürme tamamlandı!")
except Exception as e:
print(f"Hata: {e}")
elif(iss=="3"):
import yt_dlp
video_url = input("YouTube video URL'sini girin: ")
download_path = input("Videoyu nereye indirmek istersiniz? (varsayılan olarak mevcut dizin): ")
if not download_path:
download_path = '.'
ydl_opts = {
'outtmpl': f'{download_path}/%(title)s.%(ext)s',
'format': 'bestvideo+bestaudio/best',
}
try:
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
print("İndiriliyor...")
ydl.download([video_url])
print("İndirme tamamlandı!")
except Exception as e:
print(f"Hata: {e}")
elif(iss=="4"):
exesec = input("Tek dosya mı birden fazla dosya mı olsun? 1 veya 2 > ")
if(exesec=="1"):
import os
os.system("pip install pyinstaller")
projeadi = input("Python dosyasının yolunu belirtiniz > ")
os.system("pyinstaller --onefile "+projeadi)
elif(exesec=="2"):
import os
os.system("pip install pyinstaller")
projeadi = input("Python dosyasının yolunu belirtiniz > ")
os.system("pyinstaller "+projeadi)
else:
print("Sadece 1 veya 2 seçenekleri mevcuttur.")
os.system("python3 iss.py")
elif(iss=="5"):
import urllib.request
print("\n Dosya adını istediğiniz gibi belirleyebilirsiniz. Dosya uzantısı, indireceğiniz dosya uzantısı ile aynı olmak zorundadır. Bulunduğu dizine indirir\n")
dosya_linki = input("Dosya linkini giriniz >")
dosya_adi = input("Dosya adını uzantısı ile beraber giriniz > ")
urllib.request.urlretrieve(dosya_linki, dosya_adi)
print("Dosya başarıyla indirildi")
elif(iss=="6"):
print("Müziği durdurmak için ctrl+c tuş kombinasyonuna basınız. Ayrıca hata alırsanız Metfora üzerinden tam kurulum yapınız.")
mzk = input("Müzik Yolu Giriniz > ")
os.system("mpv --no-video "+mzk)
elif(iss=="7"):
os.system("python3 sexettintoolsv"+surum+".py")
else:
print("Hatalı seçim. Programı tekrar başlatıyorum \n")
os.system("python3 iss.py")