Series option is faulty; it repeat downloads the first episode selection. Looking for options...
+ Reply to Thread
Results 31 to 55 of 55
-
-
I just checked the six shows I downloaded (multiple seasons) and you're right!
-
As a temporary work-around (I hope) this javascript pasted into a developer tools console window of Chrome Browser: or Firefox-
[Attachment 73455 - Click to enlarge]
Code:var x = document.querySelectorAll("a"); var myarray = [] for (var i=0; i<x.length; i++){ var nametext = x[i].textContent; var cleantext = nametext.replace(/\\s+/g, ' ').trim(); var cleanlink = x[i].href; //myarray.push([cleantext,cleanlink]); myarray.push([cleanlink]); }; function make_table() { var table = '<table><thead><<th>Links</th></thead><tbody>'; for (var i=0; i<myarray.length; i++) { // table += '<tr><td>'+ myarray[i][0] + '</td><td>'+myarray[i][1]+'</td></tr>'; table += '<tr><td>'+ myarray[i][0] +'</td></tr>'; }; // var w = window.open(""); this.document.write(table); } make_table() var x = document.querySelectorAll("a"); var myarray = [] for (var i=0; i<x.length; i++){ var nametext = x[i].textContent; var cleantext = nametext.replace(/\\s+/g, ' ').trim(); var cleanlink = x[i].href; myarray.push([cleanlink]); }; function make_table() { var table = '<table><thead><th>Name</th><th>Links</th></thead><tbody>'; for (var i=0; i<myarray.length; i++) { //table += '<tr><td>'+ myarray[i][0] + '</td><td>'+myarray[i][1]+'</td></tr>'; table += '<tr><td>'+ myarray[i][0] +'</td></tr>'; }; var w = window.open(""); w.document.write(table); } make_table() var script = document.createElement('script'); script.src = 'https://code.jquery.com/jquery-1.11.0.min.js'; script.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(script);
There are two versions of the same javacript method. In my chrome version it successfully runs twice. It might only run once or even not at all in some browsers.
[Attachment 73456 - Click to enlarge]
On that page make a group capture of a series worth of urls. Copy those to clipboard run the script as for pick-and-mix. DO NOT USE SERIES MODE it does not work.
The plan is to use selenium or similar to grab the rendered page to allow series grabs automagically
No support for the work around method.Last edited by A_n_g_e_l_a; 27th Aug 2023 at 09:32. Reason: selenium
-
This works on Windows and can be easily modified to work with Linux.
Script captures all the links for a series.
Code:seq 1 10 | xargs -I{} curl -ks https://uktvplay.co.uk/shows/bangers-and-cash/series-{} | sed -e "s#<a href=./shows#\nhref=./shows#g" | awk "BEGIN{FS=\"\042\"} !/autoplay/ && /series-..episode.*title=/ { gsub(/href=./,\"https://uktvplay.co.uk\",$1); print $1 }"
This is the output of that script
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-1/6039834651001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-2/6024984777001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-3/6027439399001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-4/6029712434001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-5/6032068305001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-6/6070188624001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-7/6036032894001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-8/6071236211001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-9/6041162104001
https://uktvplay.co.uk/shows/bangers-and-cash/series-1/episode-10/6043453827001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-1/6125731392001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-2/6128062348001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-3/6129980676001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-4/6133231340001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-5/6136061290001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-6/6156052264001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-7/6142399966001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-8/6140711025001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-9/6142951798001
https://uktvplay.co.uk/shows/bangers-and-cash/series-2/episode-10/6145173646001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-1/6199143244001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-2/6201323677001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-3/6203753873001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-4/6205876893001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-5/6207338782001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-6/6209245211001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-7/6212713496001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-8/6210439686001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-9/6210466742001
https://uktvplay.co.uk/shows/bangers-and-cash/series-3/episode-10/6210465830001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-1/6234658315001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-2/6235284100001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-3/6241053586001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-4/6238731290001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-5/6241585720001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-6/6243811580001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-7/6245864209001
https://uktvplay.co.uk/shows/bangers-and-cash/series-4/episode-8/6247361269001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-1/6291479408001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-2/6292557170001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-3/6292691604001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-4/6294782710001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-5/6296596659001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-6/6297916078001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-7/6297889444001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-8/6299612616001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-9/6299622599001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-10/6300182503001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-11/6301405979001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-12/6301698717001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-13/6302383589001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-14/6303697894001
https://uktvplay.co.uk/shows/bangers-and-cash/series-5/episode-15/6304735105001
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-1/6311421996112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-2/6311751018112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-3/6312089973112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-4/6312008477112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-5/6312334167112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-6/6312683434112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-7/6313000366112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-8/6313452874112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-9/6313679674112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-10/6314038175112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-11/6314412973112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-12/6314807172112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-13/6315233055112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-14/6315599625112
https://uktvplay.co.uk/shows/bangers-and-cash/series-6/episode-15/6315608109112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-1/6318917296112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-2/6319154598112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-3/6319352387112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-4/6319632927112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-5/6320052620112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-6/6320523520112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-7/6321310335112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-8/6321526438112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-9/6322376111112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-10/6322654092112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-11/6323131954112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-12/6323840350112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-13/6324792381112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-14/6325496652112
https://uktvplay.co.uk/shows/bangers-and-cash/series-7/episode-15/6326305890112
https://uktvplay.co.uk/shows/bangers-and-cash/series-8/episode-1/6332436895112
https://uktvplay.co.uk/shows/bangers-and-cash/series-8/episode-2/6332764600112
-
Clever you, Jack! The more so because the page only renders by virtue of javascript; there is nothing tangible in code to grab hold of.
My solution is now working correctly and uses selenium to create a headless Chrome-browser within which to render the page. Parsing the rendered output reveals the links on a series by series basis. Just checking and re-checking for tomorrow's release -
If you want some tips on how to get the episodes without javascript, selenium or anything other than Python, look at their API's.
Code:# Request series ID's https://vschedules.uktv.co.uk/vod/brand/?slug={SERIES_SLUG} # Request episode ID's https://vschedules.uktv.co.uk/vod/series/?id={id} # Request episode data https://edge.api.brightcove.com/playback/v1/accounts/{account}/videos/{video_id}
Code:22:03:22.609 INFO : Bangers and Cash: 8 Season(s), 85 Episode(s) 22:03:23.680 INFO : Bangers.and.Cash.S01E011080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:23.681 INFO : 2ffb24e185f4470688274bffe932c2ef:00c7d6b66e2bb2bcad4f736953bd8d69 22:03:24.344 INFO : Bangers.and.Cash.S01E02.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:24.344 INFO : 47cca162ca574af8987bb0414bac254b:e7b31fed84bdeb956c4c764cc141500f 22:03:24.992 INFO : Bangers.and.Cash.S01E03.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:24.992 INFO : a781519fc4d34bc880b7ccd0429b5755:835ca677ca22eee133e11ffb659b4995 22:03:25.637 INFO : Bangers.and.Cash.S01E04.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:25.638 INFO : 7d703da4a74d45a4af3965ead2a3a88b:dd1ddaff35aec0d7fca8def2fbed692e 22:03:26.299 INFO : Bangers.and.Cash.S01E05.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:26.299 INFO : fb9384eca6ee4e239c4d30f96c429557:35da2d4c9af759d0dceb03e63485223f 22:03:26.968 INFO : Bangers.and.Cash.S01E06.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:26.968 INFO : 2240c76eb4c647f59ed8a31b6a94cb4e:80124ad130f40ac69d70c3eb35fd78c5 22:03:27.608 INFO : Bangers.and.Cash.S01E07.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:27.608 INFO : dc8381185dba440487545c1fdc4aefb7:b2f11823901c05d2a70777f577f5b0f0 22:03:28.248 INFO : Bangers.and.Cash.S01E08.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:28.248 INFO : 4ce3b2df4e3f453580df086177a5719c:52c8a8b507abf9d70e41a34db542267f 22:03:28.897 INFO : Bangers.and.Cash.S01E09.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:28.897 INFO : b6ad8dabad77494db93d44788b7721b0:5a00dd64dbeccfd7bd025eb281c98c36 22:03:29.556 INFO : Bangers.and.Cash.S01E10.1080p.UKTV.WEB-DL.AAC2.0.H.264 22:03:29.557 INFO : 944d74a4294e4b08b3fd033683513768:a6e2b3d826b50e21cea9184c9fcdd00f
-
Noticed someone yesterday doing the same thing rendering a headless browser and was shocked. There's usually an API you can use to get shows/episodes/metadata though.
-
Thank you.
How did I miss that? But at least I've found out how to get selenium working; It was ready to post! Re-write on the cards now.
now superfluous:-
Code:def get_series(start_url, start, end): try: from selenium import webdriver from selenium.webdriver.chrome.service import Service except: print("Before using series mode there is further setup to be done.") print("See the head of this script") exit(0) try: service = Service(CHROME_DRIVER_PATH) options = webdriver.ChromeOptions() options.add_argument('--headless=new') driver = webdriver.Chrome(service=service, options=options) driver.get(start_url) mycontent = driver.page_source driver.quit() except: print("Check your Chrome Driver setup and that its Path is correct.") exit(0) list = [] soup = Tureen(mycontent, "html.parser") a_tags = soup.css.select('a[href^=\"/shows/\"]') for i in range (0, len(a_tags)): cleanlink = a_tags[i]['href'] if re.search(r'\d{13}', cleanlink): list.append(f"https://uktvplay.co.uk{cleanlink}") # configure whole list to partial list if required if start == 900: return list else: mylist = [] for i in range(start, end): mylist.append(list[i]) print(list[i]) return mylist
-
Yes of course. But this old-bird didn't see it.In the normal course of running httptoolkit to watch a download. I've always started from a known video page url and never saw any part tof the api that returned useful information.Older and more blind, I guess. So assumed it was javascript rendered. Soon as I used the search though , bingo! You can't move for bits of the api revealing themselves.
-
-
Yes I guess so. Only I'v sort of got used to using the Stream Detector as my starting point. Or parsing __NEXT_DATA__. But I'm catching up now!
Selenum works very well and quite fast too. Just needs setting up though and that will put the kiddies off. -
I didn't mean anything by it, it just took me by surprise, as it seems like a really hacky solution and there is always a way to retrieve all the needed information, other then scraping the rendered website.
No harm done!
Also, nice job on the script. I had a look at UKTVPlay and although very easy to request all the data, it's always nice to have an automated solution. -
-
-
I agree that it's good to learn selenium, I only have one problem with it
which, on this site, is not a problem, but unfortunately for security reasons using the headless command, the various bearer tokens and other tokens
can only be extracted when the browser is opened and brought to the foreground.. -
-
Updated code at post #1
The Series Mode now works.
Thanks to everyone who helped by posting ideas and suggestions.Last edited by A_n_g_e_l_a; 30th Aug 2023 at 09:02.
-
After driving myself mad last evening trying to download multiple series of only 3 episodes each from UKTVPlay - I've added a download-all-series and a download-all-episodes within a series option. Script heading explains how.
Updated at 1.Last edited by A_n_g_e_l_a; 30th Aug 2023 at 08:18.
-
-
Thanks.
Found an anomaly I'm going to leave in.
Series 1
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-1/6332435333112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-2/6332376787112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-3/6332213807112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-4/6332616162112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-5/6332520391112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-6/6332434928112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-7/6332679406112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-8/6332621010112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-9/6333073772112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-10/6332618505112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-11/6333288736112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-12/6333372973112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-13/6333255545112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-14/6333371020112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-15/6333401119112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-16/6333798003112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-17/6333795413112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-18/6333851943112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-19/6333477008112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-20/6334558124112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-21/6335400832112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-22/6334240608112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-23/6335141696112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-25/6335477013112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-26/6335506428112
https://uktvplay.co.uk/shows/classic-doctors/series-1/episode-27/6335505947112
Series 1 has 26 episodes
So if you ask for episodes 20 to 27 for example the script will break.
Series are selected on series-number so do not have the issue of missing series (of which there are many!)
I can't imagine many asking for a limited range of episodes within a series and meeting the issue. I think most will use 'all' episodes or not use series mode for a few pick-and-mix selections.Last edited by A_n_g_e_l_a; 30th Aug 2023 at 09:06.
-
Similar Threads
-
question how to download video files from site uktvplay.co.uk
By barry25 in forum Video Streaming DownloadingReplies: 6Last Post: 16th Aug 2023, 07:59 -
More UKTVplay file issues
By sixpence668 in forum Video Streaming DownloadingReplies: 10Last Post: 14th Apr 2022, 15:23 -
Help downloading from UKTVPlay
By JustTheWayItIs in forum Video Streaming DownloadingReplies: 8Last Post: 18th Feb 2022, 15:51 -
how to stream uktvplay.uktv.co.uk video files and remove the drm
By elm in forum Video Streaming DownloadingReplies: 5Last Post: 31st Dec 2018, 05:42