Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from datetime import date
- today = date.today()
- date = {'YEAR': today.strftime("%Y"), 'MONTH': today.strftime("%m")}
- Main_loop = True
- URL = [
- '"https://webtv.ert.gr/webtv/live-uni/vod/dt-uni-vod.php?f={YEAR}/tv/news-themata/{VIDEO}.mp4&bgimg=https://webtv.ert.gr/wp-content/uploads/{YEAR}/{MONTH}/{IMAGE}.jpg"',#ΘΕΜΑΤΑ
- '"https://webtv.ert.gr/webtv/live-uni/vod/dt-uni-vod.php?f={YEAR}/trailers/{VIDEO}.mp4&bgimg=https://webtv.ert.gr/wp-content/uploads/{YEAR}/{MONTH}/{IMAGE}.jpg"',#TRAILERS
- '"https://webtv.ert.gr/webtv/live-uni/vod/dt-uni-vod.php?f={YEAR}/tv/kairos/{VIDEO}.mp4&bgimg=https://webtv.ert.gr/wp-content/uploads/2017/02/EIDISEIS_Kairos-1.jpg"',#ΚΑΙΡΟΣ
- '"https://webtv.ert.gr/webtv/live-uni/vod/dt-uni-vod.php?f={YEAR}/tv/politiki-epikairotita/{VIDEO}.mp4&bgimg=https://webtv.ert.gr/wp-content/uploads/{YEAR}/{MONTH}/{IMAGE}.jpg"',#ΠΟΛΙΤΙΚΗ ΕΠΙΚΑΙΡΟΤΗΤΑ
- '"https://webradio.ert.gr/webtv/live-uni/vod/dt-uni-audio-mp3.php?f=proto/{SOUND}.mp3&bgimg=https://webtv.ert.gr/wp-content/uploads/2016/11/RADIO-prwto_1280x720.jpg" frameborder="no" scrolling="no"',#ΠΡΩΤΟ
- '"https://webradio.ert.gr/webtv/live-uni/vod/dt-uni-audio-mp3.php?f=sport/{SOUND}.mp3&bgimg=https://webtv.ert.gr/wp-content/uploads/2016/11/RADIO-era-sport-1280x720.jpg" frameborder="no" scrolling="no"',#ΕΡΑ ΣΠΟΡ
- '"https://webtv.ert.gr/webtv/live-uni/vod/dt-uni-vod.php?f={YEAR}/etc/scaglioni/{VIDEO}.mp4&bgimg=https://webtv.ert.gr/wp-content/uploads/{YEAR}/{MONTH}/{IMAGE}.jpg"',#ETC-VIDEO
- '"https://webradio.ert.gr/webtv/live-uni/vod/dt-uni-audio-mp3.php?f=etc/{SOUND}.mp3&bgimg=https://webradio.ert.gr/wp-content/uploads/{YEAR}/{MONTH}/{IMAGE}.jpg" frameborder="no" scrolling="no"'#ETC-SOUND (NOT SURE IF IS CORRECT)
- ]
- #=========================================================== 1
- def vid_img(url,name):
- vid = img = ''
- flag = repeat = True
- print('\n=-=-=-=-=-=-=-=-=\nDate:',today.strftime("%d/%m/%Y"),'\n{NAME}\n=-=-=-=-=-=-=-=-=\n'.format(NAME=name))
- while(flag):
- vid = input('Video name: ')
- img = input('Image name: ')
- print('')
- if(len(vid) == 0 or len(img) == 0):
- print('Wrong Input\n')
- else:
- flag = False
- args = {'VIDEO': vid, 'IMAGE': img}
- link = url.format(**date,**args)
- iframe = '[iframe src={LINK}]'.format(LINK=link)
- print(link.replace('"',''))
- print('')
- print(iframe)
- while(repeat):
- print('\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
- user_answer = input('Repeat? ("Enter" for Yes or "N" to exit): ')
- if(user_answer.upper() == "N" or user_answer.upper() == "Ν"):
- repeat = False
- else:
- repeat = False
- vid_img(url,name)
- #=========================================================== 2
- def vid_only(url,name):
- vid = ''
- flag = repeat = True
- print('\n=-=-=-=-=-=-=-=-=\nDate:',today.strftime("%d/%m/%Y"),'\n{NAME}\n=-=-=-=-=-=-=-=-=\n'.format(NAME=name))
- while(flag):
- vid = input('Video name: ')
- print('')
- if(len(vid) == 0):
- print('Wrong Input\n')
- else:
- flag = False
- link = url.format(**date,VIDEO= vid)
- iframe = '[iframe src={LINK}]'.format(LINK=link)
- print(link.replace('"',''))
- print('')
- print(iframe)
- while(repeat):
- print('\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
- user_answer = input('Repeat? ("Enter" for Yes or "N" to exit): ')
- if(user_answer.upper() == "N" or user_answer.upper() == "Ν"):
- repeat = False
- else:
- repeat = False
- vid_only(url,name)
- #=========================================================== 3
- def sound_only(url,name):
- sound = ''
- flag = repeat = True
- print('\n=-=-=-=-=-=-=-=-=\nDate:',today.strftime("%d/%m/%Y"),'\n{NAME}\n=-=-=-=-=-=-=-=-=\n'.format(NAME=name))
- while(flag):
- sound = input('Sound name: ')
- print('')
- if(len(sound) == 0):
- print('Wrong Input\n')
- else:
- flag = False
- link = url.format(SOUND= sound)
- iframe = '[iframe src={LINK}]'.format(LINK=link)
- print(link.replace('"','').replace(' frameborder=no scrolling=no',''))
- print('')
- print(iframe)
- while(repeat):
- print('\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
- user_answer = input('Repeat? ("Enter" for Yes or "N" to exit): ')
- if(user_answer.upper() == "N" or user_answer.upper() == "Ν"):
- repeat = False
- else:
- repeat = False
- sound_only(url,name)
- #=========================================================== 4
- def sound_img(url,name):
- sound = img = ''
- flag = repeat = True
- print('\n=-=-=-=-=-=-=-=-=\nDate:',today.strftime("%d/%m/%Y"),'\n{NAME}\n=-=-=-=-=-=-=-=-=\n'.format(NAME=name))
- while(flag):
- sound = input('Sound name: ')
- img = input('Image name: ')
- print('')
- if(len(sound) == 0 or len(img) == 0):
- print('Wrong Input\n')
- else:
- flag = False
- args = {'SOUND': sound, 'IMAGE': img}
- link = url.format(**date,**args)
- iframe = '[iframe src={LINK}]'.format(LINK=link)
- print(link.replace('"','').replace(' frameborder=no scrolling=no',''))
- print('')
- print(iframe)
- while(repeat):
- print('\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
- user_answer = input('Repeat? ("Enter" for Yes or "N" to exit): ')
- if(user_answer.upper() == "N" or user_answer.upper() == "Ν"):
- repeat = False
- else:
- repeat = False
- sound_img(url,name)
- #=========================================================== END
- while(Main_loop):
- print("\n"+"+-+-"+(("--"*10)+"-+"))
- print("|1|ΘΕΜΑΤΑ |")
- print("|-|----------------------|")
- print("|2|TRAILERS |")
- print("|-|----------------------|")
- print("|3|ΚΑΙΡΟΣ |")
- print("|-|----------------------|")
- print("|4|ΠΟΛΙΤΙΚΗ ΕΠΙΚΑΙΡΟΤΗΤΑ |")
- print("|-|----------------------|")
- print("|5|ΠΡΩΤΟ |")
- print("|-|----------------------|")
- print("|6|ΕΡΑ ΣΠΟΡ |")
- print("|-|----------------------|")
- print("|7|ETC-VIDEO |")
- print("|-|----------------------|")
- print("|8|ETC-SOUND |")
- print("+-+-"+("--"*10)+"-+\n")
- loop = True
- while(loop):
- select = input('Select Number or enter "e" to exit: ')
- if(select.lower() == "e" or select.lower() == "ε"):
- loop = False
- Main_loop = False
- elif(select == '1'):
- loop = False
- vid_img(URL[0],'ΘΕΜΑΤΑ')
- elif(select == '2'):
- loop = False
- vid_img(URL[1],'TRAILERS')
- elif(select == '3'):
- loop = False
- vid_only(URL[2],'ΚΑΙΡΟΣ')
- elif(select == '4'):
- loop = False
- vid_img(URL[3],'ΠΟΛΙΤΙΚΗ ΕΠΙΚΑΙΡΟΤΗΤΑ')
- elif(select == '5'):
- loop = False
- sound_only(URL[4],'ΠΡΩΤΟ')
- elif(select == '6'):
- loop = False
- sound_only(URL[5],'ΕΡΑ ΣΠΟΡ')
- elif(select == '7'):
- loop = False
- vid_img(URL[6],'ETC-VIDEO')
- elif(select == '8'):
- loop = False
- sound_img(URL[7],'ETC-SOUND')
- else:
- print("\nWrong Input!\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement