1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[TUT] Scrape All Videos From Facebook Pages

Discussion in 'FaceBook' started by okazaki, May 31, 2016.

  1. okazaki

    okazaki Jr. VIP Jr. VIP

    Joined:
    Apr 16, 2015
    Messages:
    807
    Likes Received:
    360
    Home Page:
    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.



    [​IMG]

    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
    [​IMG]

    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"

    [​IMG]

    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:

    [​IMG]

    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:

    [​IMG]
    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
     
    • Thanks Thanks x 13
  2. chakde

    chakde Power Member

    Joined:
    Feb 24, 2010
    Messages:
    644
    Likes Received:
    757
    Looks great. Does it automatically download the HD version of the video?
     
  3. okazaki

    okazaki Jr. VIP Jr. VIP

    Joined:
    Apr 16, 2015
    Messages:
    807
    Likes Received:
    360
    Home Page:
    Yes.
     
  4. insomnijak

    insomnijak Regular Member

    Joined:
    Sep 21, 2014
    Messages:
    244
    Likes Received:
    51
    OK, this looks good. Let's say I downloaded 60 videos and I want to publish them to my FB page 2 times per day, next 30 days. How would you automate that?
     
  5. swapfile

    swapfile Newbie

    Joined:
    Mar 2, 2016
    Messages:
    31
    Likes Received:
    2
    Gender:
    Male
    Location:
    Germany
    Cool! Will check that tomorrow.

    @insomnijak: checkout massplanner.
     
  6. swapfile

    swapfile Newbie

    Joined:
    Mar 2, 2016
    Messages:
    31
    Likes Received:
    2
    Gender:
    Male
    Location:
    Germany
    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: Jun 10, 2016
  7. okazaki

    okazaki Jr. VIP Jr. VIP

    Joined:
    Apr 16, 2015
    Messages:
    807
    Likes Received:
    360
    Home Page:
    This problem occur when you use the network disk try to use your local disk.
     
  8. swapfile

    swapfile Newbie

    Joined:
    Mar 2, 2016
    Messages:
    31
    Likes Received:
    2
    Gender:
    Male
    Location:
    Germany
    great, thanks! works perfect now.
     
  9. monnoname

    monnoname Power Member

    Joined:
    Dec 18, 2015
    Messages:
    633
    Likes Received:
    87
    looking amazing! thanks for great share!! :)
     
  10. Sebastian Rooks

    Sebastian Rooks Registered Member

    Joined:
    Nov 16, 2015
    Messages:
    82
    Likes Received:
    54
    Location:
    Middle America
    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.
     
  11. clark123

    clark123 Junior Member

    Joined:
    Feb 27, 2012
    Messages:
    135
    Likes Received:
    103
    Amazing share!!! Thanks!
     
  12. insomnijak

    insomnijak Regular Member

    Joined:
    Sep 21, 2014
    Messages:
    244
    Likes Received:
    51
    I can not get the token.
    It is not visible in address bar...
     
  13. okazaki

    okazaki Jr. VIP Jr. VIP

    Joined:
    Apr 16, 2015
    Messages:
    807
    Likes Received:
    360
    Home Page:
    • Thanks Thanks x 1
  14. MillionaireTed

    MillionaireTed Junior Member

    Joined:
    Jan 4, 2016
    Messages:
    132
    Likes Received:
    43
    Occupation:
    Forex Trader+Internet Marketer.
    Location:
    Singapore
    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
     
  15. okazaki

    okazaki Jr. VIP Jr. VIP

    Joined:
    Apr 16, 2015
    Messages:
    807
    Likes Received:
    360
    Home Page:
    can you send me the page URL you used.
     
  16. hkrumar

    hkrumar Newbie

    Joined:
    Feb 11, 2015
    Messages:
    41
    Likes Received:
    1
    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?
     

    Attached Files:

  17. okazaki

    okazaki Jr. VIP Jr. VIP

    Joined:
    Apr 16, 2015
    Messages:
    807
    Likes Received:
    360
    Home Page:
  18. sagarbest

    sagarbest Senior Member

    Joined:
    Dec 27, 2008
    Messages:
    851
    Likes Received:
    306
    Occupation:
    Online Marketing
    Location:
    Technology World
    Working great! Thanks a lot of sharing this. Much needed.
     
  19. Patpatpat

    Patpatpat Junior Member

    Joined:
    Apr 17, 2013
    Messages:
    149
    Likes Received:
    37
    Gender:
    Male
    Location:
    PH
    111.PNG

    I'm getting this error after visiting the first link.
     
  20. antimage01

    antimage01 BANNED BANNED

    Joined:
    Aug 24, 2016
    Messages:
    13
    Likes Received:
    0
    Gender:
    Female
    Thanks for sharing