sticker.webp0.16 KB
19 Iyul 2024, 15:43
π© Channel was restricted by Telegram
Ko'proq ko'rsatish`python
import requests
from bs4 import BeautifulSoup
def download_instagram_reel(reel_url, output_path):
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
response = requests.get(reel_url, headers=headers)
if response.status_code != 200:
print("Error: Failed to retrieve the page")
return
soup = BeautifulSoup(response.text, 'html.parser')
video_tag = soup.find('meta', property='og:video')
if video_tag:
video_url = video_tag['content']
video_response = requests.get(video_url, headers=headers)
if video_response.status_code == 200:
with open(output_path, 'wb') as f:
f.write(video_response.content)
print(f"Video downloaded successfully and saved to {output_path}")
else:
print("Error: Failed to download the video")
else:
print("Error: Video tag not found on the page")
# KullanΔ±m ΓΆrneΔi
reel_url = "https://www.instagram.com/reel/video_id/" # Δ°ndirmek istediΔiniz reels video linki
output_path = "reel_video.mp4" # Δ°ndirmek istediΔiniz dosya ismi ve uzantΔ±sΔ±
download_instagram_reel(reel_url, output_path)
`
Bu script ile instagram reels videosunun URL'sini girerek videoyu bilgisayarΔ±nΔ±za indirebilirsiniz. Ancak, bu script'in Γ§alΔ±Εabilmesi iΓ§in videonun herkese aΓ§Δ±k olmasΔ± gerektiΔini unutmayΔ±n.
Ko'rish tajribangizni yaxshilash uchun cookie fayllaridan foydalanamiz.
Β«Hammasini qabul qilishΒ» tugmasini bosib, siz cookie fayllaridan foydalanish siyosatiga rozilik bildirasiz.