youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

[QingTing] Add new extractor

Open changren-wcr opened this issue 2 years ago • 15 comments

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:

  • [x] 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
  • [x] New extractor
  • [ ] New feature

Description of your pull request and other information

This pull request adds qingting.fm, probably the largest podcast website in China.

changren-wcr avatar Jun 12 '22 03:06 changren-wcr

  • I can play a link from the site like https://www.qingting.fm/channels/214008/programs/7016167/ in the UK but the .../vchannels/... links just give a page whose source is OK, with no actual HTML, JS or whatever.

There are two types of URLs, desktop url and mobile url. The corresponding mobile url of desktop url https://www.qingting.fm/channels/214008/programs/7016167/ is https://m.qtfm.cn/vchannels/214008/programs/7016167/.

A new extractor is added for desktop url, which will extract the alternate mobile url from webpage of desktop url.

changren-wcr avatar Jun 16 '22 12:06 changren-wcr

This PR currently contains the following errors (thanks Dirkf for enabling the tests):

./youtube_dl/extractor/qingting.py:4:1: F401 're' imported but unused
./youtube_dl/extractor/qingting.py:10:1: E302 expected 2 blank lines, found 1
./youtube_dl/extractor/qingting.py:41:1: E302 expected 2 blank lines, found 1
AssertionError: 2 != 1 : Multiple extractors with the same IE_NAME "qingting" (QingTingMobileIE, QingTingDeskTopIE)

there might be more errors in this log, but I don't think so

gamer191 avatar Jun 17 '22 17:06 gamer191

This PR currently contains the following errors (thanks Dirkf for enabling the tests):

./youtube_dl/extractor/qingting.py:4:1: F401 're' imported but unused
./youtube_dl/extractor/qingting.py:10:1: E302 expected 2 blank lines, found 1
./youtube_dl/extractor/qingting.py:41:1: E302 expected 2 blank lines, found 1
AssertionError: 2 != 1 : Multiple extractors with the same IE_NAME "qingting" (QingTingMobileIE, QingTingDeskTopIE)

Thanks a lot! These errors have been fixed.

changren-wcr avatar Jun 18 '22 01:06 changren-wcr

This is my first pull request on GitHub, please help me further refine my code and merge it into master. Thanks a lot!

changren-wcr avatar Jun 23 '22 02:06 changren-wcr

This is such an ugly website that we would only harm youtube-dl with it...

UnixCro avatar Jun 26 '22 07:06 UnixCro

The rules for site support don't cover aesthetics of design or content!

dirkf avatar Jun 26 '22 10:06 dirkf

The rules for site support don't cover aesthetics of design or content!

I really appreciate your patience and kindness in this PR, which is invaluable for a novice in the filed of open-source

changren-wcr avatar Jun 27 '22 05:06 changren-wcr

It is your repository and therefore your responsibility. I don't know anyone who has such an ugly website and the people who look at extractor.py out of curiosity that this website exists may be disturbed. I just wanted to help youtube-dl ultimately it's up to you what you think of me.

UnixCro avatar Jun 27 '22 06:06 UnixCro

If there is test metadata that you think people might find unpleasant, by all means propose it to be changed to 'md5:....' format.

dirkf avatar Jun 27 '22 09:06 dirkf

the people who look at extractor.py out of curiosity that this website exists may be disturbed

The golden rule: never look at a random website from extractors.py, as it will most likely be NSFW!

gamer191 avatar Jul 03 '22 17:07 gamer191

We humans are extremely curious creatures by nature. If someone stops us from doing something, we will keep trying until we fall out of experience. I think it sucks that people accept pull requests like this. Getting more people into that strain by watching this content out of curiosity. The one who accepted the pull request made me angry because he can't think that far, but he always helped me with help, so I tend to keep my mouth shut, but I don't think it's good!

UnixCro avatar Jul 03 '22 19:07 UnixCro

The golden rule: never look at a random website from extractors.py, as it will most likely be NSFW!

Like, I thought that's common sense when you work on/with an app that downloads from websites ? Well, any app whose source code contains any links, really, and being NSFW is pretty much irrelevant to the "don't click on random links if you dunno what you're doing" point.

rautamiekka avatar Jul 03 '22 20:07 rautamiekka

Where is the cuckoo reaction emoji when you need it.

garoto avatar Jul 03 '22 22:07 garoto

We humans are extremely curious creatures by nature. If someone stops us from doing something, we will keep trying until we fall out of experience. I think it sucks that people accept pull requests like this. Getting more people into that strain by watching this content out of curiosity. The one who accepted the pull request made me angry because he can't think that far, but he always helped me with help, so I tend to keep my mouth shut, but I don't think it's good!

@UnixCro Out of interest, what is on the website (I didn't open it for obvious reasons)?

I had assumed that you meant that you just didn't like that website, but if there is something actually bad on that website then I take back what I said (although obviously it's not my call because I'm not a maintainer)

gamer191 avatar Jul 22 '22 00:07 gamer191

The same pull request (https://github.com/yt-dlp/yt-dlp/pull/5329) has already been merge in yt-dlp, which is a youtube-dl fork with additional features and fixes. @dirkf

changren-wcr avatar Nov 13 '22 01:11 changren-wcr