{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "File downloaded successfully as 'downloaded_file.mp4'\n" ] } ], "source": [ "import requests\n", "\n", "\n", "def download_file(url, filename):\n", " # Send a HTTP GET request to the URL\n", " response = requests.get(url, stream=True)\n", "\n", " # Check if the request was successful\n", " if response.status_code == 200:\n", " # Open a local file with the specified filename in binary write mode\n", " with open(filename, 'wb') as file:\n", " # Write the content of the response to the file in chunks\n", " for chunk in response.iter_content(chunk_size=8192):\n", " file.write(chunk)\n", " print(f\"File downloaded successfully as '{filename}'\")\n", " else:\n", " print(f\"Failed to download file. HTTP Status Code: {response.status_code}\")\n", "\n", "# URL of the media file to be downloaded\n", "url = \"https://aac.saavncdn.com/306/14fabd68de4410cee4b822c89f37abd8_160.mp4\"\n", "\n", "# Filename to save the downloaded file\n", "filename = \"downloaded_file.mp4\"\n", "\n", "# Call the function to download the file\n", "download_file(url, filename)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Title: Morni - Song Download from Morni @ JioSaavn\n", "\n", "Paragraph 1: Morni  by Sunanda Sharma\n", "Paragraph 2: Song  ·  961,015 Plays  ·  3:19  ·  Punjabi\n", "Paragraph 3: © 2019 Amar Audio\n", "Paragraph 4: Play\n", "Paragraph 5: \n", "Paragraph 6: \n", "Paragraph 7: Song Lyrics\n", "Paragraph 8: Loading\n", "Paragraph 9: Loading\n", "Paragraph 10: Loading\n", "Paragraph 11: Loading\n", "Paragraph 12: Loading\n", "Paragraph 13: Listen to Morni online. Morni is\n", " a \n", " Punjabi language song and is sung by Sunanda Sharma. \n", " Morni, from the album Morni, was released in the year 2019. The duration of the song is 3:19. \n", " Download Punjabi songs online from JioSaavn.\n", "Paragraph 14: 3m 19s  ·  Punjabi\n", "Paragraph 15: © 2019 Amar Audio\n", "Paragraph 16: Morni is a punjabi song released in 2019.\n", "Paragraph 17: Morni is a punjabi song released in 2019.\n", "Paragraph 18: Morni is a punjabi song from the album Morni.\n", "Paragraph 19: Morni is a punjabi song from the album Morni.\n", "Paragraph 20: Morni is composed by Sukh-E Muzical Doctorz.\n", "Paragraph 21: Morni is composed by Sukh-E Muzical Doctorz.\n", "Paragraph 22: Morni is sung by Sunanda Sharma.\n", "Paragraph 23: Morni is sung by Sunanda Sharma.\n", "Paragraph 24: The duration of the song Morni is 3:19 minutes.\n", "Paragraph 25: The duration of the song Morni is 3:19 minutes.\n", "Paragraph 26: You can download Morni on JioSaavn App.\n", "Paragraph 27: You can download Morni on JioSaavn App.\n", "Paragraph 28: Loading Footer\n", "Paragraph 29: Go find some tunes!\n", "Paragraph 30: Play Weekly Top Songs\n", "Paragraph 31: Browse New Releases\n", "Paragraph 32: \n", "Paragraph 33: Go find some tunes!\n", "Paragraph 34: Play Weekly Top Songs\n", "Paragraph 35: Browse New Releases\n" ] } ], "source": [ "from bs4 import BeautifulSoup\n", "\n", "\n", "def scrape_website(url):\n", " # Send a GET request to the URL\n", " response = requests.get(url)\n", "\n", " # Check if the request was successful\n", " if response.status_code == 200:\n", " # Parse the HTML content using BeautifulSoup\n", " soup = BeautifulSoup(response.text, 'html.parser')\n", "\n", " # Extract the title of the webpage\n", " title = soup.title.string if soup.title else 'No title found'\n", " print(f\"Title: {title}\\n\")\n", "\n", " # Extract all paragraph texts\n", " paragraphs = soup.find_all('p')\n", " for idx, paragraph in enumerate(paragraphs, start=1):\n", " print(f\"Paragraph {idx}: {paragraph.get_text()}\")\n", " else:\n", " print(f\"Failed to retrieve the webpage. HTTP Status Code: {response.status_code}\")\n", "\n", "# URL of the website to scrape\n", "url = \"https://www.jiosaavn.com/song/morni/AxwaXgJlUHc\"\n", "\n", "# Call the function to scrape the website\n", "scrape_website(url)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Complete HTML content of the webpage:\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " Ilahi (Reprise) Lyrics - Yeh Jawaani Hai Deewani - Only on JioSaavn\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " \n", "\n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", "\n", "
\"Ilahi

Ilahi (Reprise) Lyrics

Yeh Jawaani Hai Deewani  by Pritam, Mohit Chauhan

Song  ·  7,637,189 Plays  ·  3:36  ·  Hindi

© 2013 Super Cassettes Industries Private Limited

Ilahi (Reprise) Lyrics

Shaame malang si
Raate surang si
Baagi udaan pe hi na jaane kyun
Ilahi mera jee aaye aaye
Ilahi mera jee aaye aaye

Kal pe sawaal hai jeena filhaal hai
Khaana-badoshiyon pe hi jaane kyun
Ilahi mera jee aaye aaye
Ilahi mera jee aaye aaye

Mera falsafaa kandhe pe mera basta
Chala main jahaan le chala mujhe rasta
Boondon pe nahin
Boondon ke samandar pe

Ilahi mera jee aaye aaye
Ilahi mera jee aaye aaye

Shaame malang si
Raate surang si
Baagi udaan pe hi na jaane kyun
Ilahi mera jee aaye aaye
Ilahi mera jee aaye aaye

Lyrics powered by JioSaavn


More from Yeh Jawaani Hai Deewani

Loading

You Might Like

Loading


FAQs for Ilahi (Reprise)

Loading Footer

\n", " \n", "
\n", "
\n", " \n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "Thumbnail URLs:\n", "https://c.saavncdn.com/440/Yeh-Jawaani-Hai-Deewani-2013-500x500.jpg\n", "\n", "Downloadable URLs:\n" ] } ], "source": [ "from urllib.parse import urljoin\n", "\n", "\n", "def extract_html_and_urls(url):\n", " # Send a GET request to the URL\n", " response = requests.get(url)\n", "\n", " # Check if the request was successful\n", " if response.status_code == 200:\n", " # Get the complete HTML content\n", " html_content = response.text\n", " print(\"Complete HTML content of the webpage:\\n\")\n", " print(html_content)\n", " ## write the html content in a file\n", " with open('html_content.txt', 'w') as file:\n", " file.write(html_content)\n", "\n", " # Parse the HTML content using BeautifulSoup\n", " soup = BeautifulSoup(html_content, 'html.parser')\n", "\n", " # Initialize lists to store URLs\n", " thumbnail_urls = []\n", " downloadable_urls = []\n", "\n", " # Extract internal URLs (e.g., thumbnail URLs and other downloadable resources)\n", " for img_tag in soup.find_all('img'):\n", " img_url = img_tag.get('src')\n", " if img_url:\n", " # Convert relative URLs to absolute URLs\n", " img_url = urljoin(url, img_url)\n", " thumbnail_urls.append(img_url)\n", "\n", " for a_tag in soup.find_all('a'):\n", " a_url = a_tag.get('href')\n", " if a_url and (a_url.endswith('.jpg') or a_url.endswith('.png') or a_url.endswith('.pdf') or a_url.endswith('.zip')):\n", " # Convert relative URLs to absolute URLs\n", " a_url = urljoin(url, a_url)\n", " downloadable_urls.append(a_url)\n", "\n", " # Print the extracted URLs\n", " print(\"\\nThumbnail URLs:\")\n", " for t_url in thumbnail_urls:\n", " print(t_url)\n", "\n", " print(\"\\nDownloadable URLs:\")\n", " for d_url in downloadable_urls:\n", " print(d_url)\n", " else:\n", " print(f\"Failed to retrieve the webpage. HTTP Status Code: {response.status_code}\")\n", "\n", "# URL of the website to scrape\n", "url = \"https://www.jiosaavn.com/lyrics/ilahi-reprise-lyrics/QB4gUzt9blE\"\n", "\n", "# Call the function to extract HTML and URLs\n", "extract_html_and_urls(url)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Complete HTML content of the webpage:\n", "\n", "\n", "Audio Source URL:\n", "None\n", "\n", "Meta Tag Information:\n", "{\n", " \"viewport\": \"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, user-scalable=0\",\n", " \"description\": \"Listen to Kabira song by Pritam, Tochi Raina, Rekha Bhardwaj from Yeh Jawaani Hai Deewani on JioSaavn. Hindi movie featuring Ranbir Kapoor, Deepika Padukone, Aditya Roy Kapur, Kalki Koechlin, Kunaal Roy Kapur. Download Yeh Jawaani Hai Deewani songs or listen online free, only on JioSaavn.\",\n", " \"keywords\": \"Listen to Kabira Song Online, Kabira Song MP3 by Pritam and Tochi Raina, Download Kabira Song from Yeh Jawaani Hai Deewani, Stream Bollywood Music Online, Hindi Music Download\",\n", " \"og:type\": \"music.song\",\n", " \"og:image\": \"https://c.saavncdn.com/440/Yeh-Jawaani-Hai-Deewani-2013-500x500.jpg\",\n", " \"og:image:height\": \"500\",\n", " \"og:image:width\": \"500\",\n", " \"og:title\": \"Kabira (Full Song & Lyrics) - Yeh Jawaani Hai Deewani - Download or Listen Free - JioSaavn\",\n", " \"og:description\": \"Listen to Kabira from the movie Yeh Jawaani Hai Deewani, only on JioSaavn. This Hindi movie features Ranbir Kapoor, Deepika Padukone, Aditya Roy Kapur, Kalki Koechlin, Kunaal Roy Kapur. Play online or download to listen offline free - in HD audio, only on JioSaavn.\",\n", " \"og:url\": \"https://www.jiosaavn.com/song/kabira/MxEeByVxGnA\",\n", " \"og:audio\": \"https://www.jiosaavn.com/song/kabira/MxEeByVxGnA\",\n", " \"og:audio:type\": \"audio/vnd.facebook.bridge\",\n", " \"music:duration\": \"224\",\n", " \"music:album\": \"https://www.jiosaavn.com/album/yeh-jawaani-hai-deewani/sUaYu26J-UA_\",\n", " \"music:musician\": \"https://www.jiosaavn.com/artist/amitabh-bhattacharya-songs/\",\n", " \"music:release_date\": \"2013-03-30\",\n", " \"twitter:title\": \"Kabira (Full Song & Lyrics) - Yeh Jawaani Hai Deewani - Download or Listen Free - JioSaavn\",\n", " \"twitter:description\": \"Listen to Kabira from the movie Yeh Jawaani Hai Deewani, only on JioSaavn. This Hindi movie features Ranbir Kapoor, Deepika Padukone, Aditya Roy Kapur, Kalki Koechlin, Kunaal Roy Kapur. Play online or download to listen offline free - in HD audio, only on JioSaavn.\",\n", " \"twitter:url\": \"https://www.jiosaavn.com/song/kabira/MxEeByVxGnA\",\n", " \"twitter:site\": \"@jiosaavn\",\n", " \"twitter:card\": \"summary\",\n", " \"twitter:image\": \"https://c.saavncdn.com/440/Yeh-Jawaani-Hai-Deewani-2013-150x150.jpg\",\n", " \"twitter:app:name:googleplay\": \"JioSaavn Music & Radio\",\n", " \"twitter:app:id:googleplay\": \"com.jio.media.jiobeats\",\n", " \"twitter:app:url:googleplay\": \"saavn://view/song\",\n", " \"twitter:app:name:iphone\": \"JioSaavn\",\n", " \"twitter:app:id:iphone\": \"441813332\",\n", " \"twitter:app:url:iphone\": \"saavn://view/song\",\n", " \"twitter:app:name:ipad\": \"JioSaavn\",\n", " \"twitter:app:id:ipad\": \"441813332\",\n", " \"twitter:app:url:ipad\": \"saavn://view/song\",\n", " \"al:android:url\": \"https://www.jiosaavn.com/song/kabira/MxEeByVxGnA\",\n", " \"al:android:package\": \"com.jio.media.jiobeats\",\n", " \"al:android:app_name\": \"JioSaavn Music & Radio\",\n", " \"al:ios:url\": \"saavn://view/song\",\n", " \"al:ios:app_store_id\": \"441813332\",\n", " \"al:ios:app_name\": \"JioSaavn\",\n", " \"og:site_name\": \"JioSaavn\",\n", " \"fb:app_id\": \"126986924002057\"\n", "}\n" ] } ], "source": [ "import json\n", "\n", "\n", "def extract_html_and_urls(url):\n", " # Send a GET request to the URL\n", " response = requests.get(url)\n", "\n", " # Check if the request was successful\n", " if response.status_code == 200:\n", " # Get the complete HTML content\n", " html_content = response.text\n", " print(\"Complete HTML content of the webpage:\\n\")\n", "\n", " # Parse the HTML content using BeautifulSoup\n", " soup = BeautifulSoup(html_content, 'html.parser')\n", "\n", " # Initialize a dictionary to store meta tag information\n", " meta_info = {}\n", "\n", " # Extract meta tags with 'name' or 'property' attributes\n", " for meta in soup.find_all('meta'):\n", " if meta.get('name'):\n", " meta_info[meta.get('name')] = meta.get('content')\n", " elif meta.get('property'):\n", " meta_info[meta.get('property')] = meta.get('content')\n", "\n", "\n", " # Extract the tag within the