youtube-dl
youtube-dl copied to clipboard
[QingTing] Add new extractor
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:
- [x] Searched the bugtracker for similar pull requests
- [x] Read adding new extractor tutorial
- [x] Read youtube-dl coding conventions and adjusted the code to meet them
- [x] Covered the code with tests (note that PRs without tests will be REJECTED)
- [x] Checked the code with flake8
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.
- 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 isOK
, 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.
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
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.
This is my first pull request on GitHub, please help me further refine my code and merge it into master. Thanks a lot!
This is such an ugly website that we would only harm youtube-dl with it...
The rules for site support don't cover aesthetics of design or content!
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
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.
If there is test metadata that you think people might find unpleasant, by all means propose it to be changed to 'md5:....'
format.
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!
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!
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.
Where is the cuckoo reaction emoji when you need it.
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)
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