A simple script to scrape data from BeReal without posting anything.
This tool will gather the following data in a JSON format from your Dashboard by default:
- Posted pictures (Primary and secondary)
- Location details
- Realmojis and comments made on a post
- Information about if a post was late or not
- User region
- Time posted
- And many other user specific things
- Install the required packages with
pip install -r requirements.txt
- Make a copy of the
.env.example
with the name.env
- Fill in data inside the
.env
file. (Charles Proxy from the App Store is recommended) - Locate the
Bereal_fetcher.py
file and run it - The result will be save inside the
/results
folder as a json file.- The user is also prompted by the terminal in case an output inside the terminal is wanted.
When the main
method is run, the getBRData()
method is called, which then fires getAuth()
in order to fetch an access token, which is needed to send an HTTP response with authentication to get the JSON data from a specified BeReal endpoint.
Charles Proxy is a tool that can be used to intercept and modify HTTP requests and responses. It is a great tool to use when you want to see what is going on behind the scenes of an app.
To get the REFRESH_TOKEN
and SECURE_TOKEN
used withing the .env
file, you need to intercept the request that is sent to the BeReal API. This can be done by using Charles Proxy.
- Download Charles Proxy from the App Store.
- Open the app and click on the
Settings
button in the top left corner. - Click on
SSL Proxying
and enable it. - You can also create a CA certificate if you want. Just follow the instructions on the screen.
- Go back to the main screen and click on the
Status
button to start recording the traffic. - Open the BeReal app and click around a bit.
- Go back to the main screen and click on the
Status
button to stop recording the traffic. - Now, go into the recorded session and locate https://securetoken.googleapis.com.
- Click on the request and copy the URL from the overview tab. This is the
SECURE_TOKEN
. - Next, go to the bottom of the same page and find the Request Body tab, and click on "View Body". The refreshToken here is the
REFRESH_TOKEN
you should insert into the.env
file.
In case you want to use a specific endpoint, simply change it inside the Bereal_fetcher.py script at line 70.
Example:
From the /friends endpoint
response = requests.get('https://mobile.bereal.com/api/feeds/friends', headers=headers, params=params, verify=False)
to the /memories endpoint
response = requests.get('https://mobile.bereal.com/api/feeds/memories', headers=headers, params=params, verify=False)
Posts of users who choose to make their posts public
Endpoint: /api/feeds/discovery
Posts of users who are connected with the user.
Endpoint: /api/feeds/friends
Shows contact data.
Endpoint: /scanContacts
Shows data about the profiles under the suggestions tab.
Endpoint: /friendSuggestions
Shows all of your memories.
Endpoint: /memories