52 Commits

Author SHA1 Message Date
justuser-31 4aa6849d09 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 d2fdc6e9e8 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 0be7f6b74b Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 7e84353f88 Update 2026-06-11 13:17:56 +03:00
justuser-31 e41c5b6230 Change lame to pydub module,small fixes. 2026-06-11 13:17:56 +03:00
justuser-31 9bf74da3b0 Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 2d0a6047a0 Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 87a30038a8 Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 16989f61bb Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 5362001f4e New config! More easier. 2026-06-11 13:17:56 +03:00
justuser-31 62845a7c60 Merge branch 'master' of https://gitlab.com/justuser31/getnetradio 2026-06-11 13:17:56 +03:00
justuser-31 05d1e8efd2 Add check bitrate and convert. 2026-06-11 13:17:56 +03:00
justuser-31 5d20302d21 Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 a29964c7a0 Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 1bded20483 Update 2026-06-11 13:17:56 +03:00
justuser-31 a91be31db7 Update 2026-06-11 13:17:56 +03:00
justuser-31 b674fe9988 Add new atation. 2026-06-11 13:17:56 +03:00
justuser-31 042eca9e3f Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 d0a07f6814 Merge run.sh and up.py. 2026-06-11 13:17:56 +03:00
justuser-31 4ff68789cd Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 636a66af11 Hello GPL! 2026-06-11 13:17:56 +03:00
justuser-31 5ebb457edc Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 33cdae312a Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 52f28c5d68 Update README.md 2026-06-11 13:17:56 +03:00
justuser-31 c3054b5fdc Small update 2026-06-11 13:17:56 +03:00
justuser-31 620cf3ca1a test 2026-06-11 13:17:56 +03:00
justuser-31 6c5f1a2e2a Update 2026-06-11 13:17:56 +03:00
justuser-31 1f3f2d5088 test 2026-06-11 13:17:56 +03:00
justuser-31 253b545a1f Enable upload all stations 2026-06-11 13:17:56 +03:00
justuser-31 0821d84428 fix tabs 2026-06-11 13:17:56 +03:00
justuser-31 dcd3606ed6 Fix bug.I forget '&' at the end of command. 2026-06-11 13:17:56 +03:00
justuser-31 ae1479b0a9 Add energy station 2026-06-11 13:17:56 +03:00
justuser-31 1a60a3b166 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 2bb97dd50f Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 7646cff907 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 1ea7f36db1 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 3a5034af84 Add "Install" and "Usage" 2026-06-11 13:17:56 +03:00
justuser-31 b491b1ba75 Merge branch 'master' of https://notabug.org/Justuser/getnetradio 2026-06-11 13:17:56 +03:00
justuser-31 06d4e327ec Rename files,small fix and add stop.sh 2026-06-11 13:17:56 +03:00
justuser-31 25a5aed4ad Rename run file. 2026-06-11 13:17:56 +03:00
justuser-31 ca83fd897e Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 e89446419f update 2026-06-11 13:17:56 +03:00
justuser-31 64c60cf5d5 Small update 2026-06-11 13:17:56 +03:00
justuser-31 c38d20d811 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 3bbc0f4767 General update 2026-06-11 13:17:56 +03:00
justuser-31 2c7bc86949 Update 'README.md' 2026-06-11 13:17:56 +03:00
justuser-31 cf53935fa5 update 2026-06-11 13:17:56 +03:00
justuser-31 24bd853d86 update 2026-06-11 13:17:56 +03:00
justuser-31 91762f5dee update 2026-06-11 13:17:56 +03:00
justuser-31 dffb7ff67b update 2026-06-11 13:17:56 +03:00
justuser-31 50972a05db my scripts 2026-06-11 13:17:56 +03:00
justuser-31 51b0348ed8 first commit 2026-06-11 13:17:56 +03:00
4 changed files with 73 additions and 37 deletions
+15 -5
View File
@@ -1,4 +1,4 @@
## [Install](https://gitlab.com/justuser31/getnetradio/-/blob/master/README.md#0install) | [Usage](https://gitlab.com/justuser31/getnetradio/-/blob/master/README.md#1usage) | [Telegram](https://t.me/getnetradio) | [Updates](https://gitlab.com/justuser31/getnetradio/-/blob/master/README.md#contact-updates) | [Realeses](https://gitlab.com/justuser31/getnetradio/-/releases) ## [Install](https://gitea.dmcraft.online/justuser/getnetradio#0-install) | [Usage](https://gitea.dmcraft.online/justuser/getnetradio#1-usage) | [Telegram](https://t.me/getnetradio) | [Updates](https://gitea.dmcraft.online/justuser/getnetradio#contact-updates) | [Realeses](https://gitea.dmcraft.online/justuser/getnetradio/releases)
----- -----
@@ -11,20 +11,25 @@ sudo pip3 install -U telegram-upload
#Check if all works(If not,READ MESSAGE) #Check if all works(If not,READ MESSAGE)
telegram-upload README.md telegram-upload README.md
#Audio bitrate check and convert
pip3 install pydub
#INSTALL wget
# https://www.gnu.org/software/wget/
git clone https://notabug.org/Justuser/getnetradio.git git clone https://notabug.org/Justuser/getnetradio.git
cd getnetradio cd getnetradio
``` ```
### 1.Usage ### 1.Usage
``` ```
#Config your stations and audio time in run.sh #ALL CONFIGS IN config.py
#Config upload audio file to teelegram in up.py
--to https://t.me/getnetradio_nashe0punk
#Here your link telegram channel
#Start(nohup and "&" for work in background) #Start(nohup and "&" for work in background)
nohup python3 main.py & nohup python3 main.py &
#Stop #Stop
./stop.sh ./stop.sh
#Or just kill main.py and wget
``` ```
@@ -45,6 +50,9 @@ nohup python3 main.py &
> 06.10.2022 - Merge st.sh and up.py, new release. > 06.10.2022 - Merge st.sh and up.py, new release.
> 06.10.2022 - Add check bitrate and convert with "lame".
> 06.10.2022 - New config,more easier.
----- -----
@@ -60,4 +68,6 @@ git config --global credential.helper cache
python3 -m http.server python3 -m http.server
#Change repo #Change repo
git push --repo=https://gitlab.com/justuser31/getnetradio git push --repo=https://gitlab.com/justuser31/getnetradio
git clone --branch <branchname> <remote-repo-url>
``` ```
+17
View File
@@ -0,0 +1,17 @@
#DEV-MODE
dev=True
#Time in minutes
time = "10"
#Prefix for file save location( $prefix/your.mp3 )
prefix= "~/ARCHIVE/"
#Your radio
radio = {
#name_of_file.mp3 : ["https://link_to_radio.mp3","https://link_to_telegram"]
#"-O name.mp3" after link to change name(look for example \/ )
"nashepunks.mp3" : ["https://nashe1.hostingradio.ru:18000/nashepunks.mp3","https://t.me/getnetradio_nashe0punk"],
"nrj.mp3" : ["https://ic7.101.ru:8000/v1_1 -O nrj.mp3","https://t.me/getnetradio_nrj"],
"retrofm.mp3" : ["https://emgregion.hostingradio.ru:8064/moscow.retrofm.mp3 -O retrofm.mp3","https://t.me/getnetradio_retrofm"]
}
+40 -31
View File
@@ -5,23 +5,39 @@ import threading
#Time&Date #Time&Date
from datetime import date from datetime import date
import time import time
#Config
import config
#Check bitrate and convert audio
from pydub import AudioSegment
from pydub.utils import mediainfo
#RADIO STATIONS
rad = [ #Import config
"https://nashe1.hostingradio.ru:18000/nashepunks.mp3", tw = int(config.time)
"https://ic7.101.ru:8000/v1_1 -O nrj.mp3". prefix = config.prefix
"https://emgregion.hostingradio.ru:8064/moscow.retrofm.mp3 -O retrofm.mp3" rad = config.radio
] dev = bool(config.dev)
### ###
#TIME(IN MINUTES) if dev == False:
tw = 3 wait = tw*60
wait = tw else:
### wait = tw
#Check bitrate and upload
def tg(i,tim,group):
bit = int(mediainfo(i)['bit_rate'])/1000
if bit > 128:
sound = AudioSegment.from_file(i)
sound.export("tt.mp3", format="mp3", bitrate="128k")
ss("mv tt.mp3 "+i)
ss("telegram-upload "+i+" --to "+group+" --caption "+tim)
ss("mkdir "+prefix+tim)
ss("mv "+i+" "+prefix+tim+"/")
#Save location
prefix = "~/ARCHIVE/"
###
#Upload in telegram #Upload in telegram
def upload(): def upload():
@@ -31,29 +47,21 @@ def upload():
tim = today.strftime("%d.%m.%Y_"+time.strftime("%H:%M", time.localtime())) tim = today.strftime("%d.%m.%Y_"+time.strftime("%H:%M", time.localtime()))
for i in files: for i in files:
if i == "nashepunks.mp3": if rad.get(i) == None:
ss("telegram-upload "+i+" --to https://t.me/getnetradio_nashe0punk --caption "+tim)
ss("mkdir "+prefix+tim)
ss("mv "+i+" "+prefix+tim+"/")
elif i == "nrj.mp3":
ss("telegram-upload "+i+" --to https://t.me/getnetradio_nrj --caption "+tim)
ss("mkdir "+prefix+tim)
ss("mv "+i+" "+prefix+tim+"/")
elif i == "retrofm.mp3":
ss("telegram-upload "+i+" --to https://t.me/getnetradio_retrofm --caption "+tim)
ss("mkdir "+prefix+tim)
ss("mv "+i+" "+prefix+tim+"/")
else:
pass pass
else:
print("SUCCESS")
tg(i,tim,rad[i][1])
#Download function
def rad_down(ch):
ss("wget "+ch)
while True: while True:
#Download function
def rad_down(ch):
ss("wget "+i)
#Run download #Run download
for i in rad: for i in rad:
th = threading.Thread(target=rad_down, args=(i,)) th = threading.Thread(target=rad_down, args=(rad[i][0],))
th.start() th.start()
#Wait #Wait
@@ -65,4 +73,5 @@ while True:
#Upload #Upload
upload() upload()
break if dev == True:
break
+1 -1
View File
@@ -2,4 +2,4 @@ kl=$(ps aux | grep main.py | grep python3 | awk -F " " '{print $2}')
kill $kl kill $kl
killall wget killall wget
rm *.mp3 rm *.mp3
#rm nohup.out rm nohup.out