Merge branch 'master' into Soundcloud-issue-12878
This commit is contained in:
commit
eff8d1c825
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.12.28*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
|
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.12.31*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
|
||||||
- [ ] I've **verified** and **I assure** that I'm running youtube-dl **2017.12.28**
|
- [ ] I've **verified** and **I assure** that I'm running youtube-dl **2017.12.31**
|
||||||
|
|
||||||
### Before submitting an *issue* make sure you have:
|
### Before submitting an *issue* make sure you have:
|
||||||
- [ ] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
|
- [ ] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
|
||||||
@ -35,7 +35,7 @@ Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl
|
|||||||
[debug] User config: []
|
[debug] User config: []
|
||||||
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
||||||
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
||||||
[debug] youtube-dl version 2017.12.28
|
[debug] youtube-dl version 2017.12.31
|
||||||
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
||||||
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
|
@ -7,6 +7,8 @@ python:
|
|||||||
- "3.4"
|
- "3.4"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
- "3.6"
|
- "3.6"
|
||||||
|
- "pypy"
|
||||||
|
- "pypy3"
|
||||||
sudo: false
|
sudo: false
|
||||||
env:
|
env:
|
||||||
- YTDL_TEST_SET=core
|
- YTDL_TEST_SET=core
|
||||||
|
27
ChangeLog
27
ChangeLog
@ -1,3 +1,30 @@
|
|||||||
|
version 2017.12.31
|
||||||
|
|
||||||
|
Core
|
||||||
|
+ [extractor/common] Add container meta field for formats extracted
|
||||||
|
in _parse_mpd_formats (#13616)
|
||||||
|
+ [downloader/hls] Use HTTP headers for key request
|
||||||
|
* [common] Use AACL as the default fourcc when AudioTag is 255
|
||||||
|
* [extractor/common] Fix extraction of DASH formats with the same
|
||||||
|
representation id (#15111)
|
||||||
|
|
||||||
|
Extractors
|
||||||
|
+ [slutload] Add support for mobile URLs (#14806)
|
||||||
|
* [abc:iview] Bypass geo restriction
|
||||||
|
* [abc:iview] Fix extraction (#14711, #14782, #14838, #14917, #14963, #14985,
|
||||||
|
#15035, #15057, #15061, #15071, #15095, #15106)
|
||||||
|
* [openload] Fix extraction (#15118)
|
||||||
|
- [sandia] Remove extractor
|
||||||
|
- [collegerama] Remove extractor
|
||||||
|
+ [mediasite] Add support for sites based on Mediasite Video Platform (#5428,
|
||||||
|
#11185, #14343)
|
||||||
|
+ [ufctv] Add support for ufc.tv (#14520)
|
||||||
|
* [pluralsight] Fix missing first line of subtitles (#11118)
|
||||||
|
* [openload] Fallback on f-page extraction (#14665, #14879)
|
||||||
|
* [vimeo] Improve password protected videos extraction (#15114)
|
||||||
|
* [aws] Fix canonical/signed headers generation on python 2 (#15102)
|
||||||
|
|
||||||
|
|
||||||
version 2017.12.28
|
version 2017.12.28
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
@ -171,7 +171,6 @@
|
|||||||
- **CNN**
|
- **CNN**
|
||||||
- **CNNArticle**
|
- **CNNArticle**
|
||||||
- **CNNBlogs**
|
- **CNNBlogs**
|
||||||
- **CollegeRama**
|
|
||||||
- **ComCarCoff**
|
- **ComCarCoff**
|
||||||
- **ComedyCentral**
|
- **ComedyCentral**
|
||||||
- **ComedyCentralFullEpisodes**
|
- **ComedyCentralFullEpisodes**
|
||||||
@ -449,6 +448,7 @@
|
|||||||
- **media.ccc.de**
|
- **media.ccc.de**
|
||||||
- **Medialaan**
|
- **Medialaan**
|
||||||
- **Mediaset**
|
- **Mediaset**
|
||||||
|
- **Mediasite**
|
||||||
- **Medici**
|
- **Medici**
|
||||||
- **megaphone.fm**: megaphone.fm embedded players
|
- **megaphone.fm**: megaphone.fm embedded players
|
||||||
- **Meipai**: 美拍
|
- **Meipai**: 美拍
|
||||||
@ -717,7 +717,6 @@
|
|||||||
- **safari**: safaribooksonline.com online video
|
- **safari**: safaribooksonline.com online video
|
||||||
- **safari:api**
|
- **safari:api**
|
||||||
- **safari:course**: safaribooksonline.com online courses
|
- **safari:course**: safaribooksonline.com online courses
|
||||||
- **Sandia**: Sandia National Laboratories
|
|
||||||
- **Sapo**: SAPO Vídeos
|
- **Sapo**: SAPO Vídeos
|
||||||
- **savefrom.net**
|
- **savefrom.net**
|
||||||
- **SBS**: sbs.com.au
|
- **SBS**: sbs.com.au
|
||||||
@ -892,6 +891,7 @@
|
|||||||
- **udemy**
|
- **udemy**
|
||||||
- **udemy:course**
|
- **udemy:course**
|
||||||
- **UDNEmbed**: 聯合影音
|
- **UDNEmbed**: 聯合影音
|
||||||
|
- **UFCTV**
|
||||||
- **UKTVPlay**
|
- **UKTVPlay**
|
||||||
- **umg:de**: Universal Music Deutschland
|
- **umg:de**: Universal Music Deutschland
|
||||||
- **Unistra**
|
- **Unistra**
|
||||||
|
@ -2233,8 +2233,16 @@ class YoutubeDL(object):
|
|||||||
sys.exc_clear()
|
sys.exc_clear()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
self._write_string('[debug] Python version %s - %s\n' % (
|
|
||||||
platform.python_version(), platform_name()))
|
def python_implementation():
|
||||||
|
impl_name = platform.python_implementation()
|
||||||
|
if impl_name == 'PyPy' and hasattr(sys, 'pypy_version_info'):
|
||||||
|
return impl_name + ' version %d.%d.%d' % sys.pypy_version_info[:3]
|
||||||
|
return impl_name
|
||||||
|
|
||||||
|
self._write_string('[debug] Python version %s (%s) - %s\n' % (
|
||||||
|
platform.python_version(), python_implementation(),
|
||||||
|
platform_name()))
|
||||||
|
|
||||||
exe_versions = FFmpegPostProcessor.get_versions(self)
|
exe_versions = FFmpegPostProcessor.get_versions(self)
|
||||||
exe_versions['rtmpdump'] = rtmpdump_version()
|
exe_versions['rtmpdump'] = rtmpdump_version()
|
||||||
|
@ -3,12 +3,14 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
import collections
|
import collections
|
||||||
|
import ctypes
|
||||||
import email
|
import email
|
||||||
import getpass
|
import getpass
|
||||||
import io
|
import io
|
||||||
import itertools
|
import itertools
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import re
|
import re
|
||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
@ -2906,6 +2908,24 @@ except ImportError: # not 2.6+ or is 3.x
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
compat_zip = zip
|
compat_zip = zip
|
||||||
|
|
||||||
|
if platform.python_implementation() == 'PyPy' and sys.pypy_version_info < (5, 4, 0):
|
||||||
|
# PyPy2 prior to version 5.4.0 expects byte strings as Windows function
|
||||||
|
# names, see the original PyPy issue [1] and the youtube-dl one [2].
|
||||||
|
# 1. https://bitbucket.org/pypy/pypy/issues/2360/windows-ctypescdll-typeerror-function-name
|
||||||
|
# 2. https://github.com/rg3/youtube-dl/pull/4392
|
||||||
|
def compat_ctypes_WINFUNCTYPE(*args, **kwargs):
|
||||||
|
real = ctypes.WINFUNCTYPE(*args, **kwargs)
|
||||||
|
|
||||||
|
def resf(tpl, *args, **kwargs):
|
||||||
|
funcname, dll = tpl
|
||||||
|
return real((str(funcname), dll), *args, **kwargs)
|
||||||
|
|
||||||
|
return resf
|
||||||
|
else:
|
||||||
|
def compat_ctypes_WINFUNCTYPE(*args, **kwargs):
|
||||||
|
return ctypes.WINFUNCTYPE(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'compat_HTMLParseError',
|
'compat_HTMLParseError',
|
||||||
'compat_HTMLParser',
|
'compat_HTMLParser',
|
||||||
@ -2914,6 +2934,7 @@ __all__ = [
|
|||||||
'compat_chr',
|
'compat_chr',
|
||||||
'compat_cookiejar',
|
'compat_cookiejar',
|
||||||
'compat_cookies',
|
'compat_cookies',
|
||||||
|
'compat_ctypes_WINFUNCTYPE',
|
||||||
'compat_etree_fromstring',
|
'compat_etree_fromstring',
|
||||||
'compat_etree_register_namespace',
|
'compat_etree_register_namespace',
|
||||||
'compat_expanduser',
|
'compat_expanduser',
|
||||||
|
@ -163,7 +163,8 @@ class HlsFD(FragmentFD):
|
|||||||
return False
|
return False
|
||||||
if decrypt_info['METHOD'] == 'AES-128':
|
if decrypt_info['METHOD'] == 'AES-128':
|
||||||
iv = decrypt_info.get('IV') or compat_struct_pack('>8xq', media_sequence)
|
iv = decrypt_info.get('IV') or compat_struct_pack('>8xq', media_sequence)
|
||||||
decrypt_info['KEY'] = decrypt_info.get('KEY') or self.ydl.urlopen(decrypt_info['URI']).read()
|
decrypt_info['KEY'] = decrypt_info.get('KEY') or self.ydl.urlopen(
|
||||||
|
self._prepare_url(info_dict, decrypt_info['URI'])).read()
|
||||||
frag_content = AES.new(
|
frag_content = AES.new(
|
||||||
decrypt_info['KEY'], AES.MODE_CBC, iv).decrypt(frag_content)
|
decrypt_info['KEY'], AES.MODE_CBC, iv).decrypt(frag_content)
|
||||||
self._append_fragment(ctx, frag_content)
|
self._append_fragment(ctx, frag_content)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import hashlib
|
||||||
|
import hmac
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_str
|
from ..compat import compat_str
|
||||||
@ -10,6 +13,7 @@ from ..utils import (
|
|||||||
int_or_none,
|
int_or_none,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
try_get,
|
try_get,
|
||||||
|
update_url_query,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -101,21 +105,24 @@ class ABCIE(InfoExtractor):
|
|||||||
class ABCIViewIE(InfoExtractor):
|
class ABCIViewIE(InfoExtractor):
|
||||||
IE_NAME = 'abc.net.au:iview'
|
IE_NAME = 'abc.net.au:iview'
|
||||||
_VALID_URL = r'https?://iview\.abc\.net\.au/programs/[^/]+/(?P<id>[^/?#]+)'
|
_VALID_URL = r'https?://iview\.abc\.net\.au/programs/[^/]+/(?P<id>[^/?#]+)'
|
||||||
|
_GEO_COUNTRIES = ['AU']
|
||||||
|
|
||||||
# ABC iview programs are normally available for 14 days only.
|
# ABC iview programs are normally available for 14 days only.
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://iview.abc.net.au/programs/diaries-of-a-broken-mind/ZX9735A001S00',
|
'url': 'http://iview.abc.net.au/programs/call-the-midwife/ZW0898A003S00',
|
||||||
'md5': 'cde42d728b3b7c2b32b1b94b4a548afc',
|
'md5': 'cde42d728b3b7c2b32b1b94b4a548afc',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'ZX9735A001S00',
|
'id': 'ZW0898A003S00',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Diaries Of A Broken Mind',
|
'title': 'Series 5 Ep 3',
|
||||||
'description': 'md5:7de3903874b7a1be279fe6b68718fc9e',
|
'description': 'md5:e0ef7d4f92055b86c4f33611f180ed79',
|
||||||
'upload_date': '20161010',
|
'upload_date': '20171228',
|
||||||
'uploader_id': 'abc2',
|
'uploader_id': 'abc1',
|
||||||
'timestamp': 1476064920,
|
'timestamp': 1514499187,
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
'skip': 'Video gone',
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
@ -126,20 +133,30 @@ class ABCIViewIE(InfoExtractor):
|
|||||||
title = video_params.get('title') or video_params['seriesTitle']
|
title = video_params.get('title') or video_params['seriesTitle']
|
||||||
stream = next(s for s in video_params['playlist'] if s.get('type') == 'program')
|
stream = next(s for s in video_params['playlist'] if s.get('type') == 'program')
|
||||||
|
|
||||||
format_urls = [
|
house_number = video_params.get('episodeHouseNumber')
|
||||||
try_get(stream, lambda x: x['hds-unmetered'], compat_str)]
|
path = '/auth/hls/sign?ts={0}&hn={1}&d=android-mobile'.format(
|
||||||
|
int(time.time()), house_number)
|
||||||
|
sig = hmac.new(
|
||||||
|
'android.content.res.Resources'.encode('utf-8'),
|
||||||
|
path.encode('utf-8'), hashlib.sha256).hexdigest()
|
||||||
|
token = self._download_webpage(
|
||||||
|
'http://iview.abc.net.au{0}&sig={1}'.format(path, sig), video_id)
|
||||||
|
|
||||||
# May have higher quality video
|
def tokenize_url(url, token):
|
||||||
sd_url = try_get(
|
return update_url_query(url, {
|
||||||
stream, lambda x: x['streams']['hds']['sd'], compat_str)
|
'hdnea': token,
|
||||||
if sd_url:
|
})
|
||||||
format_urls.append(sd_url.replace('metered', 'um'))
|
|
||||||
|
|
||||||
formats = []
|
for sd in ('sd', 'sd-low'):
|
||||||
for format_url in format_urls:
|
sd_url = try_get(
|
||||||
if format_url:
|
stream, lambda x: x['streams']['hls'][sd], compat_str)
|
||||||
formats.extend(
|
if not sd_url:
|
||||||
self._extract_akamai_formats(format_url, video_id))
|
continue
|
||||||
|
formats = self._extract_m3u8_formats(
|
||||||
|
tokenize_url(sd_url, token), video_id, 'mp4',
|
||||||
|
entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
|
||||||
|
if formats:
|
||||||
|
break
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
|
@ -1880,6 +1880,7 @@ class InfoExtractor(object):
|
|||||||
'language': lang if lang not in ('mul', 'und', 'zxx', 'mis') else None,
|
'language': lang if lang not in ('mul', 'und', 'zxx', 'mis') else None,
|
||||||
'format_note': 'DASH %s' % content_type,
|
'format_note': 'DASH %s' % content_type,
|
||||||
'filesize': filesize,
|
'filesize': filesize,
|
||||||
|
'container': mimetype2ext(mime_type) + '_dash',
|
||||||
}
|
}
|
||||||
f.update(parse_codecs(representation_attrib.get('codecs')))
|
f.update(parse_codecs(representation_attrib.get('codecs')))
|
||||||
representation_ms_info = extract_multisegment_info(representation, adaption_set_ms_info)
|
representation_ms_info = extract_multisegment_info(representation, adaption_set_ms_info)
|
||||||
|
@ -332,7 +332,8 @@ class OpenloadIE(InfoExtractor):
|
|||||||
phantom = PhantomJSwrapper(self, required_version='2.0')
|
phantom = PhantomJSwrapper(self, required_version='2.0')
|
||||||
webpage, _ = phantom.get(page_url, html=webpage, video_id=video_id, headers=headers)
|
webpage, _ = phantom.get(page_url, html=webpage, video_id=video_id, headers=headers)
|
||||||
|
|
||||||
decoded_id = get_element_by_id('streamurl', webpage)
|
decoded_id = (get_element_by_id('streamurl', webpage) or
|
||||||
|
get_element_by_id('streamuri', webpage))
|
||||||
|
|
||||||
video_url = 'https://openload.co/stream/%s?mime=true' % decoded_id
|
video_url = 'https://openload.co/stream/%s?mime=true' % decoded_id
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
class SlutloadIE(InfoExtractor):
|
class SlutloadIE(InfoExtractor):
|
||||||
_VALID_URL = r'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$'
|
_VALID_URL = r'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$'
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/',
|
'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/',
|
||||||
'md5': '868309628ba00fd488cf516a113fd717',
|
'md5': '868309628ba00fd488cf516a113fd717',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -15,11 +17,17 @@ class SlutloadIE(InfoExtractor):
|
|||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
'thumbnail': r're:https?://.*?\.jpg'
|
'thumbnail': r're:https?://.*?\.jpg'
|
||||||
}
|
}
|
||||||
}
|
}, {
|
||||||
|
# mobile site
|
||||||
|
'url': 'http://mobile.slutload.com/video/masturbation-solo/fviFLmc6kzJ/',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
desktop_url = re.sub(r'^(https?://)mobile\.', r'\1', url)
|
||||||
|
webpage = self._download_webpage(desktop_url, video_id)
|
||||||
|
|
||||||
video_title = self._html_search_regex(r'<h1><strong>([^<]+)</strong>',
|
video_title = self._html_search_regex(r'<h1><strong>([^<]+)</strong>',
|
||||||
webpage, 'title').strip()
|
webpage, 'title').strip()
|
||||||
|
@ -39,6 +39,7 @@ from .compat import (
|
|||||||
compat_HTMLParser,
|
compat_HTMLParser,
|
||||||
compat_basestring,
|
compat_basestring,
|
||||||
compat_chr,
|
compat_chr,
|
||||||
|
compat_ctypes_WINFUNCTYPE,
|
||||||
compat_etree_fromstring,
|
compat_etree_fromstring,
|
||||||
compat_expanduser,
|
compat_expanduser,
|
||||||
compat_html_entities,
|
compat_html_entities,
|
||||||
@ -1330,24 +1331,24 @@ def _windows_write_string(s, out):
|
|||||||
if fileno not in WIN_OUTPUT_IDS:
|
if fileno not in WIN_OUTPUT_IDS:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
GetStdHandle = ctypes.WINFUNCTYPE(
|
GetStdHandle = compat_ctypes_WINFUNCTYPE(
|
||||||
ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD)(
|
ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD)(
|
||||||
(b'GetStdHandle', ctypes.windll.kernel32))
|
('GetStdHandle', ctypes.windll.kernel32))
|
||||||
h = GetStdHandle(WIN_OUTPUT_IDS[fileno])
|
h = GetStdHandle(WIN_OUTPUT_IDS[fileno])
|
||||||
|
|
||||||
WriteConsoleW = ctypes.WINFUNCTYPE(
|
WriteConsoleW = compat_ctypes_WINFUNCTYPE(
|
||||||
ctypes.wintypes.BOOL, ctypes.wintypes.HANDLE, ctypes.wintypes.LPWSTR,
|
ctypes.wintypes.BOOL, ctypes.wintypes.HANDLE, ctypes.wintypes.LPWSTR,
|
||||||
ctypes.wintypes.DWORD, ctypes.POINTER(ctypes.wintypes.DWORD),
|
ctypes.wintypes.DWORD, ctypes.POINTER(ctypes.wintypes.DWORD),
|
||||||
ctypes.wintypes.LPVOID)((b'WriteConsoleW', ctypes.windll.kernel32))
|
ctypes.wintypes.LPVOID)(('WriteConsoleW', ctypes.windll.kernel32))
|
||||||
written = ctypes.wintypes.DWORD(0)
|
written = ctypes.wintypes.DWORD(0)
|
||||||
|
|
||||||
GetFileType = ctypes.WINFUNCTYPE(ctypes.wintypes.DWORD, ctypes.wintypes.DWORD)((b'GetFileType', ctypes.windll.kernel32))
|
GetFileType = compat_ctypes_WINFUNCTYPE(ctypes.wintypes.DWORD, ctypes.wintypes.DWORD)(('GetFileType', ctypes.windll.kernel32))
|
||||||
FILE_TYPE_CHAR = 0x0002
|
FILE_TYPE_CHAR = 0x0002
|
||||||
FILE_TYPE_REMOTE = 0x8000
|
FILE_TYPE_REMOTE = 0x8000
|
||||||
GetConsoleMode = ctypes.WINFUNCTYPE(
|
GetConsoleMode = compat_ctypes_WINFUNCTYPE(
|
||||||
ctypes.wintypes.BOOL, ctypes.wintypes.HANDLE,
|
ctypes.wintypes.BOOL, ctypes.wintypes.HANDLE,
|
||||||
ctypes.POINTER(ctypes.wintypes.DWORD))(
|
ctypes.POINTER(ctypes.wintypes.DWORD))(
|
||||||
(b'GetConsoleMode', ctypes.windll.kernel32))
|
('GetConsoleMode', ctypes.windll.kernel32))
|
||||||
INVALID_HANDLE_VALUE = ctypes.wintypes.DWORD(-1).value
|
INVALID_HANDLE_VALUE = ctypes.wintypes.DWORD(-1).value
|
||||||
|
|
||||||
def not_a_console(handle):
|
def not_a_console(handle):
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '2017.12.28'
|
__version__ = '2017.12.31'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user