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

[TASVideos] Add new extractor #27537

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

[TASVideos] Add new extractor #27537

wants to merge 11 commits into from

Conversation

EdenOvrutskiy
Copy link

@EdenOvrutskiy EdenOvrutskiy commented Dec 25, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

tasvideos.org is a website that hosts videos of tool-assisted speedruns in videogames.

According to it's legal notice :
"Movies published on this site were created by and for this site."

To watch a video on the site, click "watch now" below the thumbnail of an entry to display a video-player.
Alternatively, the site offers direct download links for various formats on each entry.
Example: http://tasvideos.org/4352M.html

"Playlists" are search results via the filters on the website. Each filter adds something to the URL,
but all URLs always starts with "tasvideos.org/Movies-.."
Example: http://tasvideos.org/Movies-Stars.html

I tried making this extractor as minimal as possible, to see if I got the hang of things.

Also - I had no choice but to add video_url = "http://www." + self._search_regex( ...
Because the website's links don't contain the http prefix.
'M' is added to playlist video ID's to match the single video url id's format
(getting the id + 'M" suffix + download links in one regex proved too difficult)

answers - #26765

Since the addition of timer + credit, I'm trying to change the title field to:
'title': 'C64 L'Abbaye des Mortsin 02:36.7 by Mothrayas.',
(at _TEST)
But github doesn't let me.
Would like to avoid making a new PR, but I don't have the folder with the branch on my pc anymore...

Copy link

@fossdd fossdd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your Pull Request looks clean, simple. Thank you for your contribution.

youtube_dl/extractor/tasvideos.py Outdated Show resolved Hide resolved
EdenOvrutskiy and others added 2 commits December 26, 2020 12:29
Change class name to reflect website's letter capitalization better.

Co-authored-by: fossdd <fossdd@tutanota.com>
@EdenOvrutskiy EdenOvrutskiy changed the title [TasVideos] Add new extractor [TASVideos] Add new extractor Dec 26, 2020
@EdenOvrutskiy
Copy link
Author

EdenOvrutskiy commented Dec 27, 2020

In the meanwhile, I'm working on the formats addition - and I've stumbled upon this quote -
at common.py , line 329:
"Unless mentioned otherwise, the fields should be Unicode strings."

I checked the format return statements in other extractors and they do in fact return u'' strings.

However, this pull request does not - should it? (given it returns the 'url' key and not formats as of yet)
Not relevant anymore since changed to formats (strikethrough instead of deleting for bugtracker documentation)

@EdenOvrutskiy
Copy link
Author

Now has playlist functionality!

optional (fatal=False) because the website's layout forced me into
an unreliably regex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants