Download facebook private videos using Python
Downloading facebook videos is quite easy.
There are several software online / offline that will do the work.
But did you try doing it with python?
Here is how I did it.
Step 1 Get View source
Step one 1:
☺ Getting the "View source" code of the facebook video. (private group / public group / facebook page)
☺ Right on the video Click on "Copy Video URL".
☺ In front of the url type "view-source:"
∟ The url will look something like this. ->
view-source:https://www.facebook.com/watch/?v=12345678910
☺ Paste and run the url on another tab of the same browser.
Step 2 Copy-Paste Source-Code in Notepad
Step two 2:
☺ Copy paste the whole source code on a notepad and save it as "fb_video_data.txt"
Step 3 Run Python Facebook Scraper
Step three 3:
☺ Create a python file and name it "find_video.py"
Copy paste the whole code in "find_video.py" and Run.
## Dev:- Joel Dcosta
## Facebook video finder
## manual search
## in front of video url - (view-source:)
##search (https://video)
## get video source copy paste on a notepad
## save it as fb_video_data.txt
## Run the program in python 3
with open("fb_video_data.txt","r",encoding="utf-8") as f:
data_raw = f.readlines()
data = str(data_raw)
data_1 = data.split('"')
for i in data_1:
if "https://video" in i:
if "BaseURL" not in i:
print(i)
with open("fb_vid_found.csv","+a") as t:
t.writelines(str(i)+"\n\n")
else:
pass