Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel 10 (AUS) tenplay.com.au site not working #21446

Closed
klan30destine opened this issue Jun 19, 2019 · 8 comments
Closed

Channel 10 (AUS) tenplay.com.au site not working #21446

klan30destine opened this issue Jun 19, 2019 · 8 comments

Comments

@klan30destine
Copy link

@klan30destine klan30destine commented Jun 19, 2019

Checklist

  • [x ] I'm reporting a broken site support
  • [x ] I've verified that I'm running youtube-dl version 2019.06.08
  • [x ] I've checked that all provided URLs are alive and playable in a browser
  • [x ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [x ] I've searched the bugtracker for similar issues including closed ones

Verbose log

PASTE VERBOSE LOG HERE

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--newline', '--format', 'mp4+m4a', '--prefer-ffmpeg', '--ffmpeg-location', 'C:\Utilities\FFMpeg\bin', '--no-overwrites', '--restrict-filenames', '--outdir', 'C:\Documents\TenPlay', 'https://10play.com.au/mr-black/episodes/season-1/episode-7/tpv190618rpzcm']
[debug] Encodings: locale cp1252, fs utf-8, out cp1252, pref cp1252
[debug] youtube-dl version 2019.06.08
[debug] Git HEAD: fe2e7db
[debug] Python version 3.6.3 (CPython) - Windows-10-10.0.17134-SP0
[debug] exe versions: ffmpeg 4.0, ffprobe 4.0
[debug] Proxy map: {}
WARNING: Falling back on generic information extractor.
ERROR: Unsupported URL: https://10play.com.au/mr-black/episodes/season-1/episode-7/tpv190618rpzcm
Traceback (most recent call last):
File "C:\Development\Python\Project_Youtube-dl\youtube_dl\YoutubeDL.py", line 805, in extract_info
ie_result = ie.extract(url)
File "C:\Development\Python\Project_Youtube-dl\youtube_dl\extractor\common.py", line 530, in extract
ie_result = self._real_extract(url)
File "C:\Development\Python\Project_Youtube-dl\youtube_dl\extractor\generic.py", line 3316, in _real_extract
raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: https://10play.com.au/mr-black/episodes/season-1/episode-7/tpv190618rpzcm

Description

WRITE DESCRIPTION HERE
I am trying to download an episode of a TV program from tenplay.com.au but I am getting an error that seems to claim that it is an unsupported URL. I downloaded an episode of this program last week 2019/06/14 and that worked OK. When I enter this URL in a browser, it brings up the correct browser window that allows the episode to be played.
When I opened the tenplay website, it popped up a message saying Welcome to the new tenplay site. So they have done some changes to the site and one that is obvious is the last part of the URL "tpv190618rpzcm" which was not on the URL I used to download last week. So they have added some coding to the URL that probably needs to be used to get to the actual site for the episode.
I am running YOUTUBE-DL from the Python code and not an EXE on Windows The program has not called FFMPEG yet so I believe that the problem is in the YOUTUBE-DL code in how it is analysing the data it is retrieving from the website to pass to FFMPEG. Also, there is no tenplay.py in the extractor folder so it is using the generic.py source to analyse the specific data related to tenplay.
Thanks
Adrian

@klan30destine
Copy link
Author

@klan30destine klan30destine commented Aug 9, 2019

YoutubeDL v2019.08.02
I have developed a solution for the 10play.com.au problem where Channel Ten has changed the format of the URL that accesses the episode.
I am not a Python programmer. The language I am familiar with is C++ so I had a go at finding a solution for the 10Play problem. The URL now contains a code as the last field where previously it did not have one.
I obtained the browser data for a TV episode on10play.com.au. I compared the 7Plus URL and found it was similar to the 10Play format with a code as the last field. I explored this further and obtained the browser data for a 7Plus episode and noticed that 7Plus extraction was similar.
My solution therefore was to define a new extractor file for 10play (tenplay.py) instead of using the generic.py file. I used the 7Plus extractor as a base for the 10play extractor. Both 7Plus and 10play use the Brightcove functionality with only a few differences based on the specific functionality for each extraction.
Investigating the 10play browser data, I was able to determine that the main extraction data to provide to FFMPEG was already coded in the brightcove.py file. I coded the initial load for the 10play URL based on the specific details for 10play episode. After that I was able to pass the rest of the processing to the Brightcove functionality.
In the brightcove.py file, I found most of the code to process the Brightcove data was in the _real_extract(). To avoid making any changes to this function, I created a separate function _brightcove_extract() where the code is sourced from _real_extract() with only a few changes or additions.
Once I added the new extractor to the list in extractors.py, the process was now using the new tenplay class to validate the URL and was able to extract an episode from 10play.com.au. There was an issue in that I found 2 different 10play URL formats when I was developing this solution. I have catered for the 2 formats I encountered in the _VALID_URL regex but have not verified if there are more formats.
I have also added some unittest files for tenplay.py and brightcove.py to my solution.
I developed this solution on Windows 10 and Python V3.6.3 and as such cannot test it on other hosts. As I said, I am not a Python programmer, so the code may not be up to the standard of an experienced Python programmer or an experienced Youtube-DL programmer. I will provide the GIT diff code for the source that I have modified and added to my source for the Youtube-DL v2019.08.02. I will provide this source as is so that if an experienced Youtube-DL programmer wants to review the code and refactor it to allow this solution to be added to the existing product, you are welcome to use any part of this solution.
The files changed/added are
youtube_dl/extractor/tenplay.py
youtube_dl/extractor/brightcove.py
youtube_dl/extractor/extractors.py
test/test_tenplay.py
test/test_brightcove.py

A git diff of the files I have modified or added is attached to this comment.
tenplaydiff.txt
brightcovediff.txt
extractorsdiff.txt
testtenplaydiff.txt
testbrightcovediff.txt

Klan30destine

@klan30destine klan30destine mentioned this issue Aug 14, 2019
0 of 2 tasks complete
@section83
Copy link

@section83 section83 commented Aug 21, 2019

Channel 10 a major network in Australia - equivalent to ITV, TV5Monde, RTL, NBC or CBS (they are owned by CBS). So, it would greatly help Australian users if this issue could be fixed.

@klan30destine
Copy link
Author

@klan30destine klan30destine commented Aug 21, 2019

I believe I have fixed the problem. It is working for me but I need someone else to verify it with the git diff of the files I provided. I am not an experienced Python programmer so if someone else has the ability to review the code and refactor it where needed, then they update the Github to the required Youtube-DL standard, the solution can be shared.
Klan30destine

@section83
Copy link

@section83 section83 commented Sep 6, 2019

I believe I have fixed the problem.

Can you post your solution as a pull request ? That might encourage someone to have a look

@klan30destine
Copy link
Author

@klan30destine klan30destine commented Sep 7, 2019

Unfortunately, I am not familiar with pull requests or working on github. At the moment I do not have the time to learn about pull requests and was hoping somebody else with Youtube-DL and Python experience might be able to provide that requirement from the diffs I provided. Apologies for this as I have some full time work I have to do over the next month and cannot afford the time to do other work.
Klan30destine

@section83
Copy link

@section83 section83 commented Sep 8, 2019

Fair enough – don't worry, we non-Pythoneers will have to wait. In the meantime, there are commercial tools which can DL from 10Play.

@section83
Copy link

@section83 section83 commented Feb 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.