[xhamster] Move into own file
[youtube-dl] / youtube_dl / InfoExtractors.py
1 import base64
2 import datetime
3 import itertools
4 import netrc
5 import os
6 import re
7 import socket
8 import time
9 import email.utils
10 import xml.etree.ElementTree
11 import random
12 import math
13 import operator
14 import hashlib
15 import binascii
16 import urllib
17
18 from .utils import *
19 from .extractor.common import InfoExtractor, SearchInfoExtractor
20
21 from .extractor.ard import ARDIE
22 from .extractor.arte import ArteTvIE
23 from .extractor.bandcamp import BandcampIE
24 from .extractor.bliptv import BlipTVIE, BlipTVUserIE
25 from .extractor.comedycentral import ComedyCentralIE
26 from .extractor.collegehumor import CollegeHumorIE
27 from .extractor.dailymotion import DailymotionIE
28 from .extractor.depositfiles import DepositFilesIE
29 from .extractor.eighttracks import EightTracksIE
30 from .extractor.escapist import EscapistIE
31 from .extractor.facebook import FacebookIE
32 from .extractor.flickr import FlickrIE
33 from .extractor.funnyordie import FunnyOrDieIE
34 from .extractor.gametrailers import GametrailersIE
35 from .extractor.generic import GenericIE
36 from .extractor.googleplus import GooglePlusIE
37 from .extractor.googlesearch import GoogleSearchIE
38 from .extractor.howcast import HowcastIE
39 from .extractor.hypem import HypemIE
40 from .extractor.ina import InaIE
41 from .extractor.infoq import InfoQIE
42 from .extractor.justintv import JustinTVIE
43 from .extractor.keek import KeekIE
44 from .extractor.liveleak import LiveLeakIE
45 from .extractor.metacafe import MetacafeIE
46 from .extractor.mixcloud import MixcloudIE
47 from .extractor.mtv import MTVIE
48 from .extractor.myspass import MySpassIE
49 from .extractor.myvideo import MyVideoIE
50 from .extractor.nba import NBAIE
51 from .extractor.statigram import StatigramIE
52 from .extractor.photobucket import PhotobucketIE
53 from .extractor.pornotube import PornotubeIE
54 from .extractor.rbmaradio import RBMARadioIE
55 from .extractor.redtube import RedTubeIE
56 from .extractor.soundcloud import SoundcloudIE, SoundcloudSetIE
57 from .extractor.spiegel import SpiegelIE
58 from .extractor.stanfordoc import StanfordOpenClassroomIE
59 from .extractor.steam import SteamIE
60 from .extractor.teamcoco import TeamcocoIE
61 from .extractor.ted import TEDIE
62 from .extractor.tumblr import TumblrIE
63 from .extractor.ustream import UstreamIE
64 from .extractor.vbox7 import Vbox7IE
65 from .extractor.vimeo import VimeoIE
66 from .extractor.vine import VineIE
67 from .extractor.worldstarhiphop import WorldStarHipHopIE
68 from .extractor.xnxx import XNXXIE
69 from .extractor.xhamster import XHamsterIE
70 from .extractor.xvideos import XVideosIE
71 from .extractor.yahoo import YahooIE, YahooSearchIE
72 from .extractor.youjizz import YouJizzIE
73 from .extractor.youku import YoukuIE
74 from .extractor.youporn import YouPornIE
75 from .extractor.youtube import YoutubeIE, YoutubePlaylistIE, YoutubeSearchIE, YoutubeUserIE, YoutubeChannelIE
76 from .extractor.zdf import ZDFIE
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122 def gen_extractors():
123     """ Return a list of an instance of every supported extractor.
124     The order does matter; the first extractor matched is the one handling the URL.
125     """
126     return [
127         YoutubePlaylistIE(),
128         YoutubeChannelIE(),
129         YoutubeUserIE(),
130         YoutubeSearchIE(),
131         YoutubeIE(),
132         MetacafeIE(),
133         DailymotionIE(),
134         GoogleSearchIE(),
135         PhotobucketIE(),
136         YahooIE(),
137         YahooSearchIE(),
138         DepositFilesIE(),
139         FacebookIE(),
140         BlipTVIE(),
141         BlipTVUserIE(),
142         VimeoIE(),
143         MyVideoIE(),
144         ComedyCentralIE(),
145         EscapistIE(),
146         CollegeHumorIE(),
147         XVideosIE(),
148         SoundcloudSetIE(),
149         SoundcloudIE(),
150         InfoQIE(),
151         MixcloudIE(),
152         StanfordOpenClassroomIE(),
153         MTVIE(),
154         YoukuIE(),
155         XNXXIE(),
156         YouJizzIE(),
157         PornotubeIE(),
158         YouPornIE(),
159         GooglePlusIE(),
160         ArteTvIE(),
161         NBAIE(),
162         WorldStarHipHopIE(),
163         JustinTVIE(),
164         FunnyOrDieIE(),
165         SteamIE(),
166         UstreamIE(),
167         RBMARadioIE(),
168         EightTracksIE(),
169         KeekIE(),
170         TEDIE(),
171         MySpassIE(),
172         SpiegelIE(),
173         LiveLeakIE(),
174         ARDIE(),
175         ZDFIE(),
176         TumblrIE(),
177         BandcampIE(),
178         RedTubeIE(),
179         InaIE(),
180         HowcastIE(),
181         VineIE(),
182         FlickrIE(),
183         TeamcocoIE(),
184         XHamsterIE(),
185         HypemIE(),
186         Vbox7IE(),
187         GametrailersIE(),
188         StatigramIE(),
189         GenericIE()
190     ]
191
192 def get_info_extractor(ie_name):
193     """Returns the info extractor class with the given ie_name"""
194     return globals()[ie_name+'IE']