r/Python • u/[deleted] • Mar 28 '20
I Made This I made a python script to download and save your favorite Facebook videos.
199
Mar 28 '20
whose the lady in the background
74
Mar 28 '20
it's just a wallpaper
139
Mar 28 '20
Where did you get the wallpaper from
189
u/unsurestill Mar 28 '20
dude he's determined about this lmfao
104
Mar 28 '20 edited Mar 28 '20
44
u/postandchill Mar 28 '20
Reddit sleuth : go deeper!
15
13
15
Mar 28 '20
damn bro thx for url π₯ :)
3
5
1
22
-6
4
3
134
1
11
u/Faith-in-Strangers Mar 28 '20
Is the progress bar tqdm ?
If so, how did you make it work for a download progress ?
7
2
2
9
u/frankstan33 Mar 28 '20 edited Apr 07 '20
Holy moly that's really cool. I'm talking about the background...
Jokes aside, it's really cool man. How long did it take you btw?
7
20
7
u/subbed_ Mar 28 '20
Slight hint, change if val != None to if val is not None
1
7
u/shottyZZ Mar 28 '20
Why
3
u/subbed_ Mar 28 '20
Because it is faster (by ~50%) and idiomatic python. This is a generally accepted consensus in the python community
1
1
3
7
6
u/bozymandias Mar 28 '20
-2
u/aziad1998 Mar 28 '20
1
u/sneakpeekbot Mar 28 '20
Here's a sneak peek of /r/subsithoughtifellfor using the top posts of all time!
#1: Ah yes, i staple bread to trees aswell | 69 comments
#2: This made me laugh | 68 comments
#3: r/watchpeopledie | 111 commentsI'm a bot, beep boop | Downvote to remove | Contact ^^me | ^^Info | ^^Opt-out
2
1
1
1
1
1
1
u/GmLucifer Mar 28 '20 edited Mar 28 '20
Where did you learn to do this? Was there any specific tutorial you referred to? If yes, please share. Great job btw.
1
1
u/forty3thirty3 Mar 28 '20
"favorite Facebook videos"
No.
Edit: jokes aside though, very impressive!
1
1
1
Mar 28 '20
This didn't work for me. _thelist is empty. the video I was trying to download is almost a decade old if that has anything to do with it.
1
1
u/nkitas Mar 28 '20
that's cool! I made a program that downloads videos from youtube using the pytube ;)
3
u/megaminddefender Mar 28 '20
I did the same with youtube_dl and later found out it downloads not only from YouTube links but lots of others!
2
2
2
u/mangoed Mar 28 '20
Thanks, very useful! Any tips on how to modify this script to enable download of a video that is not publicly available (i.e. posted in a closed group or friends-only)? Authentication would be required, so I guess this calls for Selenium?
4
u/aymen_kh Mar 28 '20
look up for youtube-dl its what all downloading websites use it support a gigaton of websites with and without authrntification like youtube fb vimeo pornhub etc.. its open source & python
2
u/mangoed Mar 28 '20
What I was able to do is to log into facebook using Selenium, open the video page in browser, and assign html = driver.page_source, but from here it does not work because substrings 'hd_src:"https' and 'sd_src:"https' are not found in html. Any ideas what might be wrong?
1
u/jceyes Mar 28 '20
Being that the video's url is manually copied from this session, it wouldn't be that much harder to do the same with cookie or whatever token from request headers
1
1
1
u/ftabr Mar 28 '20
Nice!
Suggestion: detect a facebook video url in clipboard and download it automatically. Also, the user can use an argument to disable it.
1
1
1
1
1
u/GabeGoalssss Mar 28 '20
Pretty cool! i like the design that says "FACEBOOK DOWNLOADER" in /'s... How long did it take?
1
u/blackheartredeye Mar 31 '20
Which I had already made in telegram bot
Facebook :- https://t.me/fbvidz_2_bot
Instagram:- https://t.me/instavidz_2_bot
1
1
u/uberdavis Mar 28 '20
You do realise that Facebook employ full-time staff to investigate data scraping?
https://www.facebook.com/careers/jobs/239862547193905/
I would keep this on the low if I were you.
1
0
u/hivemind_unity Mar 28 '20
Can you share the video you downloaded? I was kinda vibing with that headbanging.. :-P
2
0
0
0
71
u/[deleted] Mar 28 '20
GitHub repo - https://github.com/sameera-madushan/Facebook-Video-Downloader