Iyarkai Download Tamilyogi -

def tamilyogi_downloader(url): try: # Assuming direct link or special handling for Tamilyogi response = requests.get(url, stream=True) if response.status_code == 200: # Get the total size of the file total_size = int(response.headers.get('content-length', 0)) block_size = 1024 wrote = 0 with open('video.mp4', 'wb') as f: for data in response.iter_content(block_size): f.write(data) wrote += len(data) if total_size > 0: print(f"Downloading: {int(100 * wrote / total_size)}%") print("Download Complete!") else: print("Failed to download") except Exception as e: print(f"An error occurred: {e}")

def download_video(url): try: yt = YouTube(url) yt.streams.get_highest_resolution().download() print("Download Complete!") except Exception as e: print(f"An error occurred: {e}") iyarkai download tamilyogi

def iyarkai_download(): print("Select a platform:") print("1. Tamilyogi") print("2. YouTube") choice = input("Enter your choice: ") if choice == '1': url = input("Enter Tamilyogi video URL: ") tamilyogi_downloader(url) elif choice == '2': url = input("Enter YouTube video URL: ") download_video(url) else: print("Invalid choice") iyarkai download tamilyogi