Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import time
- import datetime
- print('podaj link do nagrania')
- link = input()
- print('dzień nagrania')
- data_day = input()
- print('miesiąc nagrania')
- data_month = input()
- print('rok nagrania')
- data_year = input()
- print('godzina nagrania')
- data_hour = input()
- print('minuty nagrania')
- data_min = input()
- print('długość nagrania w minutach')
- long = int(input())*60
- data = (data_day+'/'+data_month+'/'+data_year+' '+data_hour+':'+data_min)
- data1 = ''.join(data)
- element = datetime.datetime.strptime(data1,'%d/%m/%Y %H:%M')
- timestamp = datetime.datetime.timestamp(element)
- rectime2 = '?utc='
- firstlink = (link+rectime2)+str(int(timestamp))
- r = requests.get(firstlink, timeout=1, stream=True)
- link2 = (r.url)
- x = link2.split('/')
- x1 = (x[0]+'//'+x[2]+'/'+x[3]+'/index-'+str(int(timestamp))+'-'+str(long)+'.mp4?')
- y = (x[4])
- z = y.split('?')
- z1= x1+z[1]
- print(z1)
- input("zamknij Enter")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement