aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTom-Oliver Heidel <github@tom-oliver.eu>2020-09-13 00:47:45 +0200
committerGitHub <noreply@github.com>2020-09-13 00:47:45 +0200
commitdc6193cb220353a26218da2f690f11bca55c9757 (patch)
tree2f363d45de32c74e96702981b207a4d3d8bffbdc /docs
parente02cdb31bb9d7d80d382fcc37f61e08cc7dc56f0 (diff)
downloadhypervideo-pre-dc6193cb220353a26218da2f690f11bca55c9757.tar.lz
hypervideo-pre-dc6193cb220353a26218da2f690f11bca55c9757.tar.xz
hypervideo-pre-dc6193cb220353a26218da2f690f11bca55c9757.zip
[skip travis] create faq.md
how to redirect to another extractor
Diffstat (limited to 'docs')
-rw-r--r--docs/faq.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 000000000..b0f8cad14
--- /dev/null
+++ b/docs/faq.md
@@ -0,0 +1,31 @@
+- 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,
+ }
+ ```