Here is how to download Facebook Videos with Pageurl Using Python, With time, social media has emerged as an eminent medium for social interaction, sharing of content and news. One of these social media applications is Facebook, which has made it easier to keep in touch with friends and share content.
Often, you may have even felt compelled to download some videos for later use. On Facebook, there are many fun and informative videos. As a Python enthusiast, you must be excited to know that you can also download Facebook videos using Python.
In this tutorial, we will learn how to do that.
Download Facebook Videos with Pageurl Using Python
Here is the code to download facebook videos using python
import sys import os import requests as r import wget filedir = os.path.join('C:/Users/varsh/Downloads') try: LINK = "https://www.facebook.com/peopleareawesome/videos/637730157348346/" #url of video to be downloaded html = r.get(LINK) except r.ConnectionError as e: print("Error in connecting") except r.Timeout as e: print("Timeout") except r.RequestException as e: print("Invalid URL") except (KeyboardInterrupt, SystemExit): print("System has quit") sys.exit(1) except TypeError: print("Video seems to be private ") else: print("\n") print("Video Quality:Normal " ) print("[+] Starting Download") wget.download(LINK,filedir) print("\n") print("Video downloaded")
Video Quality:Normal [+] Starting Download -1 / unknown Video downloaded