code stringlengths 3 6.57k |
|---|
http(s) |
__init__(self) |
getURL(self, url) |
urllib2.Request(url) |
urllib2.urlopen(request) |
response.read() |
response.close() |
getApiURL(self, url) |
cookielib.CookieJar() |
urllib2.HTTPHandler() |
urllib2.HTTPSHandler() |
urllib2.HTTPCookieProcessor(cookies) |
urllib2.build_opener(*handlers) |
urllib2.Request(authUrl) |
opener.open(authRequest) |
urllib2.Request(url) |
request.add_header('User-Agent', cmnHandler.spoofAs('CHROME') |
opener.open(request) |
response.read() |
response.close() |
call(self, endpoint, query = None) |
if (query) |
urllib.urlencode(query) |
self.getApiURL(url) |
getVideoInfoByID(self, videoId) |
self.call(endpoint, query) |
json.loads(responseData) |
getStreamInfoByID(self, streamId) |
self.call(endpoint, query) |
json.loads(responseData) |
getTopGames(self, page = 0, limit = 50) |
self.call(endpoint, query) |
json.loads(responseData) |
searchByGameTitle(self, title, page = 0, limit = 50) |
self.call(endpoint, query) |
json.loads(responseData) |
getTopStreamsByGameID(self, id, page = 0, limit = 50) |
self.call(endpoint, query) |
json.loads(responseData) |
parseURL(self, url) |
_url_re.match(url) |
groupdict() |
getVideoType(self, url) |
self.parseURL(url) |
getPrefferedVideoURL(self, data) |
sm3u8.parseHandler() |
sm3u8Parser.parse(data) |
if (playlists[idx]) |
if (streamQuality['resolution'].find(quality) |
sys.exit() |
clearUri(self, uri) |
uri.split('#') |
main(argv) |
wasdAPIHandler() |
helpersHandler() |
len(argv) |
sys.exit() |
argparse.ArgumentParser(description=cmnHandler.getScriptDescription('wasd.tv') |
cmnHandler.getScriptEpilog() |
argParser.add_argument('-u', '--url', action='store', dest='url', help='The video/channel url') |
argParser.add_argument('-q', '--quality', action='store', dest='quality', help='Set the preffered video quality. This is optional. If not set or if it is not available the default quality weight will be used.') |
argParser.add_argument('-tg', '--top-games', action='store_true', default=False, dest='topgames', help='Get a list of the current Top Games with live streams available, based on the number of viewers') |
argParser.add_argument('-sg', '--search-game', action='store', dest='searchgame', help='Search for available streams based on game title/id') |
argParser.add_argument('-shh', '--silence', action='store_true', default=False, dest='silence', help='If this is set, the script will not output anything, except of errors.') |
argParser.parse_args() |
if (args.silence != True) |
cmnHandler.showIntroText() |
if (args.url) |
helpers.getVideoType(args.url) |
if (args.quality) |
vqw.wasdVQW.insert(0, args.quality) |
if (args.topgames) |
wasdApi.getTopGames() |
cmnHandler.uniStrip(game['game_name']) |
sys.exit() |
if (args.searchgame) |
int(gameTitle) |
wasdApi.searchByGameTitle(gameTitle) |
cmnHandler.uniStrip(game['game_name']) |
wasdApi.getTopStreamsByGameID(gameId) |
cmnHandler.uniStrip(stream['media_container_name']) |
sys.exit() |
if (videoType['channel'] or videoType['video']) |
wasdApi.getVideoInfoByID(streamId) |
wasdApi.getStreamInfoByID(streamId) |
if (stream_media) |
wasdApi.getURL(stream_media[0]['media_meta']['media_url']) |
if (m3u8Response) |
helpers.getPrefferedVideoURL(m3u8Response) |
helpers.clearUri(uri) |
and (args.silence != True) |
cmnHandler.videoAutoplay(uri, 'list') |
sys.exit() |
sys.exit() |
main(sys.argv[1:]) |
spacy.load('en', tagger=False, parser= False, matcher = False) |
nlp(article) |
print(ent.label_, ent.text) |
extract_frame(movie_files_dir, out_dir) |
glob.glob(movie_files_dir) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.