add youtube-dl no check cert
add youtube-dl arg "no-check-cert"
This commit is contained in:
Binary file not shown.
@@ -77,7 +77,7 @@ def ph_download_playlist(url, model_name, limit):
|
||||
|
||||
# tmp_playlist download
|
||||
print('... Getting playlist information...')
|
||||
playlist_download_command = ["youtube-dl", "-j", "--flat-playlist", url]
|
||||
playlist_download_command = ["youtube-dl", "-j", "--flat-playlist", "--no-check-certificate", url]
|
||||
res = subprocess.run(playlist_download_command, capture_output=True, text=True).stdout.split("\n")
|
||||
if (limit != 0 ):
|
||||
print("[!] Limit: {} videos".format(limit))
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
from lib_pornhub import *
|
||||
import argparse
|
||||
|
||||
import ssl
|
||||
|
||||
try:
|
||||
_create_unverified_https_context = ssl._create_unverified_context
|
||||
except AttributeError:
|
||||
# Legacy Python that doesn't verify HTTPS certificates by default
|
||||
pass
|
||||
else:
|
||||
# Handle target environment that doesn't support HTTPS verification
|
||||
ssl._create_default_https_context = _create_unverified_https_context
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--url', type=str, help = 'URL of Pornhub video')
|
||||
|
||||
Reference in New Issue
Block a user