mirror of https://github.com/yt-dlp/yt-dlp
Readthedocs support (#107)
Authored-by: shirtjs <2660574+shirtjs@users.noreply.github.com>pull/85/head^2
parent
5b1ecbb327
commit
a17417e8ca
@ -0,0 +1,23 @@
|
|||||||
|
# .readthedocs.yaml
|
||||||
|
# Read the Docs configuration file
|
||||||
|
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||||
|
|
||||||
|
# Required
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
# Build documentation in the docs/ directory with Sphinx
|
||||||
|
sphinx:
|
||||||
|
configuration: docs/conf.py
|
||||||
|
|
||||||
|
# Optionally build your docs in additional formats such as PDF
|
||||||
|
formats:
|
||||||
|
- epub
|
||||||
|
- pdf
|
||||||
|
- htmlzip
|
||||||
|
|
||||||
|
# Optionally set the version of Python and requirements required to build your docs
|
||||||
|
python:
|
||||||
|
version: 3
|
||||||
|
install:
|
||||||
|
- requirements: docs/requirements.txt
|
||||||
|
- requirements: requirements.txt
|
@ -1,31 +0,0 @@
|
|||||||
- Q: How to redirect to another extractor?
|
|
||||||
- A:
|
|
||||||
- Most simple using only `url_result`
|
|
||||||
```
|
|
||||||
# get proper url first if needed.
|
|
||||||
return self.url_result(url)
|
|
||||||
```
|
|
||||||
- Using `_request_webpage` and `to_screen` in addition
|
|
||||||
```
|
|
||||||
urlh = self._request_webpage(
|
|
||||||
url, id, note='Downloading redirect page')
|
|
||||||
url = urlh.geturl()
|
|
||||||
self.to_screen('Following redirect: %s' % url)
|
|
||||||
return self.url_result(url)
|
|
||||||
```
|
|
||||||
- Using `return` construction
|
|
||||||
```
|
|
||||||
return {
|
|
||||||
'_type': 'url_transparent',
|
|
||||||
'url': url,
|
|
||||||
'ie_key': ExampleIE.ie_key(),
|
|
||||||
'id': id,
|
|
||||||
}
|
|
||||||
# Alternative if extractor supports internal uri like kaltura
|
|
||||||
return {
|
|
||||||
'_type': 'url_transparent',
|
|
||||||
'url': 'kaltura:%s:%s' % (partner_id, kaltura_id),
|
|
||||||
'ie_key': KalturaIE.ie_key(),
|
|
||||||
'id': id,
|
|
||||||
}
|
|
||||||
```
|
|
@ -0,0 +1 @@
|
|||||||
|
../README.md
|
@ -1,23 +0,0 @@
|
|||||||
Welcome to youtube-dlc's documentation!
|
|
||||||
======================================
|
|
||||||
|
|
||||||
*youtube-dlc* is a command-line program to download videos from YouTube.com and more sites.
|
|
||||||
It can also be used in Python code.
|
|
||||||
|
|
||||||
Developer guide
|
|
||||||
---------------
|
|
||||||
|
|
||||||
This section contains information for using *youtube-dlc* from Python programs.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
module_guide
|
|
||||||
|
|
||||||
Indices and tables
|
|
||||||
==================
|
|
||||||
|
|
||||||
* :ref:`genindex`
|
|
||||||
* :ref:`modindex`
|
|
||||||
* :ref:`search`
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
recommonmark>=0.6.0
|
||||||
|
m2r2
|
Loading…
Reference in New Issue