Hello,
Video url: https://coivl.net/trangchu/v/zneaif
I have been getting "Error fetching the URL: 403 Client Error: Forbidden for url: https://coivl.net/trangchu/v/zneaii" every time I try to send a request. I've tried copying header and cookies and still doesn't work. I can access it via the browser and can play the video.
Any idea what needs to be passed?
Thanks
+ Reply to Thread
Results 1 to 23 of 23
-
-
No idea why it doesn't work directly, but one way is to save the m3u8 content to a local file and use N_m3u8DL-RE on it.
https://www.swisstransfer.com/d/b7fb43a2-ec42-4274-85ca-3112e149aac9--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
What client are you attempting to use? PowerShell? Python request? Something else?
Would be very useful to see your command/code. -
curl -A "xxxx" https://coivl.net/trangchu/v/zneaif
<!DOCTYPE html>
<html lang="vi" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#234556">
<meta name="msapplication-navbutton-color" content="#234556">
<meta name="apple-mobile-web-app-status-bar-style" content="#234556">
...Last edited by LZAA; 22nd Nov 2024 at 14:58.
-
Apologies for the slow response, got real busy yesterday night. To answer, it's Python and very simple quests:
Code:def get_hrefs_and_title(url): # headers headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', 'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.9', 'Connection': 'keep-alive', 'referer': 'https://coivl.net/' } try: response = requests.get(url, headers=headers, cookies=cookies) response.raise_for_status() soup = BeautifulSoup(response.content, 'html.parser')
-
Still no go:
Code:def get_hrefs_and_title(url): # Define the cookies cookies = { ---ommitted } # Define the headers headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36', 'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.8', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Connection': 'keep-alive', 'Origin': 'https://vietnoiket.com', 'X-Requested-With': 'XMLHttpRequest' } try: with httpx.Client(http2=True) as client: response = httpx.get(url, headers=headers, cookies=cookies) response.raise_for_status() # Raise an error if the status code is not 2xx
-
-
Indeed. So does the following for me - status code 200...
Code:import httpx with httpx.Client(http2=True) as client: response = httpx.get('https://coivl.net/trangchu/v/zneaif') response.raise_for_status() print(response.status_code)
-
Change User Agent in your Browser.
you will find the good link to download the video for example with hlsdl.
[Attachment 83656 - Click to enlarge]
Code:hlsdl -b -c -u "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" -h "Referer:https://vietnoiket.com" -o "S2ZHakFFYi9mQVlPdy9OUndia3k5d3hrUFV0Ykl2c0dQL3loOU91N3EvQ09qUkcxWDF2M3NDOXA0KzIvK1JuN1hXNFR1d0w4ekJlVmJray9hWWxNU0syYjlocXpoeVVaMVlQbnIvNzBpSm5ueTQ4MzhmRytreGt5VTdJMlJFTGRiR1lDdW9FUDZXQzRTRDY2Ri9saVJPZkNqdWJVQjVldkpwZTJzdmIrcktyK2pISXZKVFdkcU9pV3ZVMWlycjZDVlhuWFBVdDBrVEVaaVA5QlJCbmYvRXhOSm9SOWlFdU4rZ29yZHJ3QjhRR2JTT1BWZ1RHeTBBcWlnV0JXTmt4UXJWWGZEb1FXUUFVTUNkMFN2TDhzTHdDYUROSW4yYmNKdmFXbVI3NkMrMG89.ts" "https://vietnoiket.com/m3/S2ZHakFFYi9mQVlPdy9OUndia3k5d3hrUFV0Ykl2c0dQL3loOU91N3EvQ09qUkcxWDF2M3NDOXA0KzIvK1JuN1hXNFR1d0w4ekJlVmJray9hWWxNU0syYjlocXpoeVVaMVlQbnIvNzBpSm5ueTQ4MzhmRytreGt5VTdJMlJFTGRiR1lDdW9FUDZXQzRTRDY2Ri9saVJPZkNqdWJVQjVldkpwZTJzdmIrcktyK2pISXZKVFdkcU9pV3ZVMWlycjZDVlhuWFBVdDBrVEVaaVA5QlJCbmYvRXhOSm9SOWlFdU4rZ29yZHJ3QjhRR2JTT1BWZ1RHeTBBcWlnV0JXTmt4UXJWWGZEb1FXUUFVTUNkMFN2TDhzTHdDYUROSW4yYmNKdmFXbVI3NkMrMG89"
Many browser extensions works.
[Attachment 83658 - Click to enlarge] -
found all the episodes links, do curl https://coivl.net/trangchu/v/zneaif
now scroll down about half way until you see <div id="halim-list-server" class="list-eps-ajax">
below that are all 18 episodes. -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Code:
def get_hrefs_and_title(url, logging): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3' } try: response = requests.get(url, headers=headers) response.raise_for_status() soup = BeautifulSoup(response.content, 'html.parser') # Select the first <ul> element inside the specified div first_ul = soup.select_one('.halim-list-eps') # Extract hrefs from the first <ul> element if first_ul: halim_episodes = first_ul.select('li.halim-episode a') hrefs = [a.get('href') for a in halim_episodes if a.get('href')] # Extract title title_element = soup.select_one('.entry-title') title = title_element.get_text(strip=True) if title_element else 'default-title' # Remove "- Tap.*" from title title = re.sub(r'-\s*Tap.*$', '', title) # Remove accents and format title for filename title = unidecode(title) # Remove accents filename = re.sub(r'\s+', '-', title.lower()) filename = re.sub(r'[^\w\-]', '', filename) # Remove any non-alphanumeric characters except hyphens # Remove trailing hyphen if it exists filename = re.sub(r'-$', '', filename) # Format title for show_title (title case) show_title = title.title().strip() # Remove any extra spaces return hrefs, filename, show_title except requests.exceptions.RequestException as e: print(f"Error fetching the URL: {e}") return [], 'default-title', 'Default Title'
-
-
Make a simple separate script where you include the necessary minimal code that gives you problems with the 403. That includes the minimum necessary imports and also a small main code that calls that method for a specific URL. I'm asking cause I'm running this code you gave with no problems and I dunno if I put the wrong URL.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
You didn't get a 403 Forbidden? Here is a simple one:
Code:import argparse import requests def send_request(url): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', 'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.9', 'Connection': 'keep-alive', 'referer': 'https://vietnoiket.com' } try: response = requests.get(url, headers=headers) response.raise_for_status() # Raises an error for bad status codes print(f"Response from {url}:") print(response.text) except requests.exceptions.RequestException as e: print(f"Error occurred: {e}") if __name__ == "__main__": # Set up argument parser parser = argparse.ArgumentParser(description="Send API request and print response") parser.add_argument("-u", "--url", type=str, required=True, help="URL to send the request to") # Parse arguments args = parser.parse_args() # Send API request send_request(args.url)
Error occurred: 403 Client Error: Forbidden for url: https://coivl.net/trangchu/v/zneaif -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
the m3u8 link of the video is in the image.
[Attachment 83744 - Click to enlarge] -
Similar Threads
-
Help with coivl
By InfinitiX2 in forum Video Streaming DownloadingReplies: 3Last Post: 28th Aug 2024, 02:53 -
Video download from Bunny (b-cdn.net or mediadelivery.net)
By tadkozh in forum Video Streaming DownloadingReplies: 6Last Post: 27th Nov 2023, 16:01 -
Struggle to download from ArtStation.com
By HughieLad in forum Video Streaming DownloadingReplies: 26Last Post: 13th Sep 2021, 12:29 -
Everything.NET
By stax76 in forum ComputerReplies: 3Last Post: 30th Apr 2021, 11:10 -
Is MakMKV.com Now MakeMKV.net or is .net Malicious?
By jdreffner in forum Blu-ray RippingReplies: 5Last Post: 25th Apr 2021, 14:05