Ejemplo n.º 1
0
if __name__ == "__main__":
    # creates instance of session
    session = Session()

    # set location (Don't need to be logged in for this)
    session.setCustomLocation("Leuven, Belgium")

    # replace this with your own email and password!
    email = "*****@*****.**"
    password = "******"

    # login using your google account with a verified email!
    session.loginUsingGoogle(email, password)

    # Alternatively you can login using facebook with a connected profile!
    session.loginUsingFacebook(email, password)

    # Alternatively, you can also use your phone number to login
    '''
    - country is needed to get the right prefix, in my case +32
    - phone_number is everything after the prefix (+32)
    NOTE: this is not my phone number :)
    '''
    country = "Belgium"
    phone_number = "479011124"
    session.loginUsingSMS(country, phone_number)

    # spam likes, dislikes and superlikes
    # to avoid being banned:
    #   - it's best to apply a randomness in your liking by sometimes disliking.
    #   - some sleeping between two actions is recommended
Ejemplo n.º 2
0
import constants

if __name__ == "__main__":

    # creates instance of session
    session = Session()

    # set a custom location
    session.setCustomLocation("Leuven, Belgium")

    # login using your google account with a verified email!
    session.loginUsingGoogle(email=constants.email_google,
                             password=constants.password_google)

    # Alternatively you can login using facebook with a connected profile!
    session.loginUsingFacebook(email=constants.email_facebook,
                               password=constants.password_facebook)

    # start scraping as much geomatches as possible
    while True:
        # get user
        geomatch = session.getGeomatch()

        # check if crucial data is not empty (This will rarely be the case tho, but we want a 'clean' dataset
        if geomatch.getName() is not None \
                and geomatch.getImageURLS() != []:

            # let's store the data of the geomatch locally
            session.storeLocal(geomatch)

            # display the saved data in terminal
            print(geomatch.getDictionary())