fix some stuffs

fixed some stuffs
This commit is contained in:
tnt2402
2022-09-12 01:26:58 +07:00
parent f043336eef
commit a2346a93bb
4 changed files with 15 additions and 9 deletions

View File

@@ -2,6 +2,11 @@
PornHub-dl is a Python tool for downloading PornHub video/playlist. PornHub-dl is a Python tool for downloading PornHub video/playlist.
## Requirements
```bash
Python 3.7 or later
ffmpeg
```
## Installation ## Installation

Binary file not shown.

View File

@@ -83,13 +83,14 @@ def ph_download_playlist(url, model_name, limit):
print("[!] Limit: {} videos".format(limit)) print("[!] Limit: {} videos".format(limit))
count = 0 count = 0
for i in range(len(res) - 1): for i in range(len(res) - 1):
try:
if (count == limit): if (count == limit):
break
sys.exit() sys.exit()
try:
video_dict = ast.literal_eval(res[i]) video_dict = ast.literal_eval(res[i])
video = ydl.extract_info(str(video_dict["url"]), download=False) video = ydl.extract_info(str(video_dict["url"]), download=False)
filename = fix_title(str(video["title"])) + '.' + str(video['ext']) filename = fix_title(str(video["title"])) + '.' + str(video['ext'])
print('\n\n\n\n#######################\n\n[-] Video #{}: {}\n\n'.format(i, filename)) print('\n\n\n\n#######################\n\n[-] Video #{}: {}\n\n'.format(count, filename))
filename = download_dir + '\\' + model_name + '\\' + filename filename = download_dir + '\\' + model_name + '\\' + filename
url_video = video['url'] url_video = video['url']
result = subprocess.run(["downloadm3u8", "-o", filename, url_video]) result = subprocess.run(["downloadm3u8", "-o", filename, url_video])

View File

@@ -1,7 +1,7 @@
bs4==0.0.1 bs4
requests==2.28.1 requests
youtube-dl==2020.1.1 youtube-dl
lxml==4.6.3 lxml
pyfiglet==0.8.post1 pyfiglet
m3u8downloader==0.10.1 m3u8downloader