yt-dlp
yt-dlp copied to clipboard
Donate link in README.md doesn't work on PyPI (but does work on GitHub)
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- [X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field
Checklist
- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version 2023.02.17 (update instructions) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the guidelines for opening an issue
Provide a description that is worded well enough to be understood
On the PyPI page for yt-dlp https://pypi.org/project/yt-dlp/ there is a red DONATE link at the top of the Project Description.
This Donate link goes to https://pypi.org/project/yt-dlp/Collaborators.md/#collaborators which is a 404 currently.
On the GitHub page, the link works by going to https://github.com/yt-dlp/yt-dlp/blob/master/Collaborators.md#collaborators
I believe this is because they are both using the same README.md and the relative link works on GitHub but doesn't work on PyPI.
Provide verbose output that clearly demonstrates the problem
- [X] Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>
) - [X] Copy the WHOLE output (starting with
[debug] Command-line config
) and insert it below
Complete Verbose Output
This is a problem with the README.md file, and not related to running yt-dlp itself. There is no verbose output to copy and paste here. See description.
This is because it uses relative paths instead of absolute ones. While we could use absolute paths, that would mean the links would always point to the master branch. This might not be desirable.
This issue is mentioned on the PyPi page itself
PS: Some links in this document will not work since this is a copy of the README.md from Github
There are a few other links too that have the same problem. A solution to this would require we postprocess the file here:
https://github.com/yt-dlp/yt-dlp/blob/17ca19ab60a6a13eb8a629c51442b5248b0d8394/setup.py#L28
I believe \]\((?!https?://)(?!#)
gives all relevant links
8: [](Collaborators.md#collaborators "Donate")
11: [](supportedsites.md "Supported Sites")
12: [](LICENSE "License")
69: * [CONTRIBUTING](CONTRIBUTING.md#contributing-to-yt-dlp)
70: * [Opening an Issue](CONTRIBUTING.md#opening-an-issue)
71: * [Developer Instructions](CONTRIBUTING.md#developer-instructions)
105: * ... See the [changelog](Changelog.md) or the [list of supported sites](supportedsites.md)
125: See [changelog](Changelog.md) or ...
317: ... your fork's [build workflow](.github/workflows/build.yml) to ...
1892: ... at [`yt_dlp/YoutubeDL.py`](yt_dlp/YoutubeDL.py#L184).
2196: See [CONTRIBUTING.md](CONTRIBUTING.md#contributing-to-yt-dlp) for instructions on [Opening an Issue](CONTRIBUTING.md#opening-an-issue) and [Contributing code to the project](CONTRIBUTING.md#developer-instructions)
While we are at it, it'd be nice to replace the PyPi
badge with a Github
one
Seems I am mistaken. Header anchors (#installation etc) also don't work on PyPi. ~~Not sure how they can be fixed~~
Fix: https://github.com/pypa/readme_renderer/issues/169#issuecomment-808577486