Git Product home page Git Product logo

facebook-image-fetcher's Introduction

Facebook hack - profile images fetcher

Facebook graph search provides a very useful, however, a hidden way to get the full-size profile pictures of any user-id or username.

Note - No login/signup required to execute this script.

For example,

http://graph.facebook.com/picture?id=122&width=800

This url will redirect to the full-size profile image of the user-id "122". Similarly,

http://graph.facebook.com/picture?id=ankit&width=800

This url will redirect to the full-size profile image of the username "ankit".

This module written in python will provide a simple API or direct usage to fetch any number of full-size facebook profile images of users either mentioned as range of user-ids or a text file containing newline separated usernames.

Motivation

Since according to the facebook privacy policy, all of these full-size profile images are public, the script enables to obtain a huge dataset of random real images legally free of cost, especially for the purposes of research (Machine Learning, Image Processing), or maybe marketing or more.

Dependencies

The python modules are needed in order to use this library.

urllib
sys
os
datetime
json

Usage

Clone the repository and use the following code.

Run the command directly from the console with command line arguments to the file fb_image.py. The command line arguments are explained as:

fb_image.py [filename]
fb_image.py [id1] [id2]

where id1 and id2 defines the range of userids whose images are to be fetched. For example,

$ python fb_image.py example.txt
$ python fb_image.py 12 16

OR

import fb_image as fb
fb.get_profile_of_id(12,16)
fb.get_profile_of_file("example.txt")

The above code will obtain and save the profile images of the mentioned usersids (12-16) or usernames mentioned in "example.txt" file".

OR

Use example.py available with the repository.

$ python example.py

API

import fb_image as fb

Import the module in your main file.

fb.get_profile_of_id(id1, id2)

Function to get profile images of userids from id1 to id2.

fb.get_profile_of_file(filename)

Function for get profile images of userids or usernames specified in the given file (usernames and userids are to be separated using newline).

id1 is the starting userid, Type: Integer.

id2 is the ending userid, Type: Integer.

filename is the text file containing userids and usernames separated by newline, Type: String.

Contributors

Author: Ankit Aggarwal

If anybody is interested in working on developing this library, fork and feel free to get in touch with me.

License

MIT License

facebook-image-fetcher's People

Contributors

ankitaggarwal011 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.