Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
jens | 159e4a44b7 | ||
jens | 85aee01979 | ||
cc4b8d70b6 |
|
@ -1,11 +1,13 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
print "What is the URL of your Apple Downloads resource?\nURL:"
|
||||
print "What is the URL of your Apple Downloads resource?\nYou should find this on https://developer.apple.com/download/ \nURL:"
|
||||
url = gets.strip
|
||||
|
||||
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
|
||||
token = gets.strip
|
||||
|
||||
print "Make sure you have aria2 installed (brew install aria2) "
|
||||
|
||||
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
|
||||
|
||||
exec(command)
|
||||
|
|
|
@ -54,6 +54,7 @@ struct LoginView: View{
|
|||
struct VRTNuView: View{
|
||||
var vrtNu: VRTNu
|
||||
var body: some View {
|
||||
|
||||
NavigationView(){
|
||||
List(vrtNu.getShows(), id: \.title){ show in
|
||||
NavigationLink(destination: ShowView(show: show)){
|
||||
|
@ -72,8 +73,8 @@ struct VRTNuView: View{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}.navigationTitle("Browse VRT Nu")//.listStyle(DefaultListStyle())
|
||||
}.navigationBarTitle("Browse VRT Nu")
|
||||
}
|
||||
}
|
||||
}
|
||||
struct ShowView: View {
|
||||
|
|
|
@ -51,7 +51,16 @@ struct Episode: Hashable, Comparable{
|
|||
let duration = videojson.value(forKey: "duration") as! Double
|
||||
let title = videojson.value(forKey: "title") as! String
|
||||
let targetURLs = videojson.value(forKey: "targetUrls") as! [NSDictionary]
|
||||
let videourl = targetURLs[0].value(forKey: "url") as! String
|
||||
var videourl = targetURLs[0].value(forKey: "url") as! String
|
||||
|
||||
// it seams that the hls_aes stream has more changes of playing
|
||||
// TODO: pass all streams and switch stream if one fails?
|
||||
for i in 0 ..< targetURLs.count{
|
||||
if targetURLs[i].value(forKey: "type") as! String == "hls_aes"{
|
||||
videourl = targetURLs[i].value(forKey: "url") as! String
|
||||
}
|
||||
}
|
||||
|
||||
print(videourl)
|
||||
//session.get('https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/videos/%s?vrtPlayerToken=%s&client=%s@PROD' %(video_id, token, clientid)).json()
|
||||
var video = Video(hlsUrl: URL(string: videourl)!,
|
||||
|
|
Loading…
Reference in a new issue