[TUT] Scrape All Videos From Facebook Pages

okazaki

Senior Member
Joined
Apr 16, 2015
Messages
886
Reaction score
409
Hi BHW,

I made a app for one of my customer and I want to share it here to BHW. the app can scrape and download all videos from a facebook page.
To use the app you need a access token and a page id

First step: Get a access token.

Visit this link and accept all the permissions.

Code:
https://www.facebook.com/v1.0/dialog/oauth?scope=ads_management,create_event,create_note,email,export_stream,friends_about_me,friends_activities,friends_birthday,friends_checkins,friends_education_history,friends_events,friends_games_activity,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_online_presence,friends_photo_video_tags,friends_photos,friends_questions,friends_relationship_details,friends_relationships,friends_religion_politics,friends_status,friends_subscriptions,friends_videos,friends_website,friends_work_history,manage_friendlists,manage_notifications,manage_pages,photo_upload,publish_actions,publish_checkins,publish_stream,read_friendlists,read_insights,read_mailbox,read_page_mailboxes,read_requests,read_stream,rsvp_event,share_item,sms,status_update,user_about_me,user_activities,user_birthday,user_education_history,user_events,user_games_activity,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_questions,user_relationship_details,user_relationships,user_religion_politics,user_status,user_subscriptions,user_videos,user_website,user_work_history,video_upload,xmpp_login,offline_access,user_checkins,publish_actions,user_photos,user_videos,friends_videos,friends_photos,user_activities,user_likes,user_status,friends_status,publish_stream,read_stream,status_update,offline_access&redirect_uri=https%3A%2F%2Fwww.htcsense.com%2Fauth%2Ffacebook%2Fcallback&response_type=token&client_id=41158896424

After accepting all the permissions, you will be redirected to this URL.



BOPcEyl


To get the access token, you need to visit The above link. The token will be visible in the address bar. You will then need to select and copy the token from the "=" to the "&". The token will be valid forever so you don't need to do this step every time just save the token for another use.

Code:
view-source:https://www.facebook.com/v1.0/dialog/oauth?scope=ads_management,create_event,create_note,email,export_stream,friends_about_me,friends_activities,friends_birthday,friends_checkins,friends_education_history,friends_events,friends_games_activity,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_online_presence,friends_photo_video_tags,friends_photos,friends_questions,friends_relationship_details,friends_relationships,friends_religion_politics,friends_status,friends_subscriptions,friends_videos,friends_website,friends_work_history,manage_friendlists,manage_notifications,manage_pages,photo_upload,publish_actions,publish_checkins,publish_stream,read_friendlists,read_insights,read_mailbox,read_page_mailboxes,read_requests,read_stream,rsvp_event,share_item,sms,status_update,user_about_me,user_activities,user_birthday,user_education_history,user_events,user_games_activity,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_questions,user_relationship_details,user_relationships,user_religion_politics,user_status,user_subscriptions,user_videos,user_website,user_work_history,video_upload,xmpp_login,offline_access,user_checkins,publish_actions,user_photos,user_videos,friends_videos,friends_photos,user_activities,user_likes,user_status,friends_status,publish_stream,read_stream,status_update,offline_access&redirect_uri=https%3A%2F%2Fwww.htcsense.com%2Fauth%2Ffacebook%2Fcallback&response_type=token&client_id=41158896424

iXPzMvC


Second Step: Get the page id

For example we want the ID of this page https://www.facebook.com/LADbible/
First to do is open the page --> right click in picture profile --> "copy link address"

xD3uy4I


After copying the link paste it in Notepad and extract the page id, in our example the red part is the page id

https://www.facebook.com/LADbible/photos/a.199099086803956.50560.199098633470668/2580021035378404/?type=3&source=11


App Option:

WjGHo3B


List : To list the video link in the grid.
List and download : To list and download the scraped video. the file will be saved with the caption as file name.
Likes : scrape videos with number of like from x to x .
Date : scrape videos posted in precised date.


When you choose "list and download option" the result will be like this:

5dtdj4t

Virustotal scan link
Code:
https://www.virustotal.com/en/file/4a1b2f5f05c82b1be023914003b7e03227d556ada25d73ea431ba4b4db4b2993/analysis/1464733627/
Download
Code:
http://www.mediafire.com/download/uz5eatfj3cxv272/FVPS.rar
https://www.sendspace.com/file/mf6zo8
 
Looks great. Does it automatically download the HD version of the video?
 
hmm.. tried it... but when starting on the vps i get the error message "Error creating the Web Proxy specified in the 'system.net/deafultProxy' configuartion section" ...
 
Last edited:
hmm.. tried it... but when starting on the vps i get the error message "Error creating the Web Proxy specified in the 'system.net/deafultProxy' configuartion section" ...

This problem occur when you use the network disk try to use your local disk.
 
You're a better man than me. I'd probably try to get a little coin out of this if I wrote it.
Thanks for a quality share.
 
hello OP, your software seems to be alittle faulty, stops after 14 downloads... theeres more than 40 videos on the page, when i try again it loads but doesnt download anything
 
hello OP, your software seems to be alittle faulty, stops after 14 downloads... theeres more than 40 videos on the page, when i try again it loads but doesnt download anything

can you send me the page URL you used.
 
Hi there,

First off, thank you for the programs.. both the image and video scrapers are great.
Just a note, i have successfully scraped videos and images from 2 pages but the 3rd page is giving me errors.

upload_2016-8-15_16-46-39.png


Any ideas why this is showing up?
 

Attachments

  • upload_2016-8-15_16-41-10.png
    upload_2016-8-15_16-41-10.png
    3.8 KB · Views: 171
Working great! Thanks a lot of sharing this. Much needed.
 
Back
Top