MiyukiQAQ / MissAV-Downloader

A tool for downloading videos from the "MissAV" website that can help you build your own private video library.
MIT License
74 stars 16 forks source link

download fail, movie cant open, #10

Closed ShakeWeLy closed 2 months ago

ShakeWeLy commented 2 months ago

image image image

it was my porblem for changing some code?

`def recursion_fill_movie_urls_by_page(playlist_url,movie_url_list): html_source = https_request_with_retry(request_url=playlist_url) if html_source is None: return # 如果重试失败,直接返回

movie_url_matches = re.findall(pattern=href_regex_public_playlist, string=html_source)
temp_url_list = list(set(movie_url_matches))
movie_url_list.extend(temp_url_list)
print("page: " + playlist_url)
print("movie url list: ")
print(temp_url_list)
print()
next_page_matches = re.findall(pattern=href_regex_next_page, string=html_source)
if (len(next_page_matches) == 1):
    next_page_url = next_page_matches[0]
    recursion_fill_movie_urls_by_page(next_page_url,movie_url_list)

def https_request_with_retry(request_url, max_retries=5, delay=2): retries = 0 while retries < max_retries: try: response = requests.get(url=request_url, headers=headers, timeout=5, verify=False).content return response except Exception as e: print(f"Failed to fetch data (attempt {retries + 1}/{max_retries}): {e} url is: {request_url}") retries += 1 time.sleep(delay) print(f"Max retries reached. Failed to fetch data. url is: {request_url}") return None # 设置 DNS def set_dns(): dnsip = '8.8.8.8' # 使用 Google 的公共 DNS socket.setdefaulttimeout(60) socket.gethostbyname = lambda : dns_ip

set_dns()

def get_movie_uuid(movie_url): try: html = requests.get(url=movie_url, headers=headers, verify=False, timeout=60).text return html except requests.exceptions.RequestException as e: print(f"Failed to fetch movie UUID: {e}") return None`

MiyukiQAQ commented 2 months ago

You should use ffmpeg. Do you have QQ or WeChat? I can show you how to use this downloader with ffmpeg.

MiyukiQAQ commented 2 months ago

First of all, you should be from some ancient oriental country, so you need http proxy, secondly, it may be because of ffmpeg problem, for some reasons, we can only discuss it privately

ShakeWeLy commented 2 months ago

It should be an issue with the HTTP proxy. I have very little knowledge about this

ShakeWeLy commented 2 months ago

thx, i spent some time to check,it finally work!

MiyukiQAQ commented 2 months ago

Great😃