starnumber12046 / bereal.py Goto Github PK
View Code? Open in Web Editor NEWPython BeReal API wrapper
Python BeReal API wrapper
Hello!
When executing the plain demo code, everything up to date, I get this error:
...
Building wheels for collected packages: BeReal
Building wheel for BeReal (setup.py) ... done
Created wheel for BeReal: filename=BeReal-1.0.0-py3-none-any.whl size=6527 sha256=f96c1aeb774d791676c549c115fc42bf84cd58249141c0c01232b8e0ed80cd8f
Stored in directory: /tmp/pip-ephem-wheel-cache-slrfhkj8/wheels/77/bc/51/5d252cce15658f9db5f0b895c4a1f795b500678411b98baa56
Successfully built BeReal
DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
Installing collected packages: BeReal
Successfully installed BeReal-1.0.0
[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: python3 -m pip install --upgrade pip
cybertimon@server:~/Repositories/Python_Experiments$ python3 befake.py
Traceback (most recent call last):
File "/home/cybertimon/Repositories/Python_Experiments/befake.py", line 3, in <module>
client = BeReal.client("+41782089223")
AttributeError: module 'BeReal' has no attribute 'client'
After digging the code and renaming client to BeReal, I get this:
Building wheels for collected packages: BeReal
Building wheel for BeReal (setup.py) ... done
Created wheel for BeReal: filename=BeReal-1.0.0-py3-none-any.whl size=6527 sha256=f96c1aeb774d791676c549c115fc42bf84cd58249141c0c01232b8e0ed80cd8f
Stored in directory: /tmp/pip-ephem-wheel-cache-slrfhkj8/wheels/77/bc/51/5d252cce15658f9db5f0b895c4a1f795b500678411b98baa56
Successfully built BeReal
DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
Installing collected packages: BeReal
Successfully installed BeReal-1.0.0
[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: python3 -m pip install --upgrade pip
cybertimon@server:~/Repositories/Python_Experiments$ python3 befake.py
Traceback (most recent call last):
File "/home/cybertimon/Repositories/Python_Experiments/befake.py", line 3, in <module>
client = BeReal.client("+41782089223")
AttributeError: module 'BeReal' has no attribute 'client'
The python script looks like this (except for my blurred phone number):
import BeReal, json
client = BeReal.BeReal("+41*8*0*9**3")
# Send and verify OTP
client.send_code()
otp = input("You should have received an authentication code. Please check your phone and enter it below.")
client.verify_code(otp)
# Initialize the client with BeReal-provided tokens
client.initialize_client()
# Save credentials
f = open("creds.json", "w")
f.write(json.dumps(client.save_session()))
f.close()
# Get logged in user
me = client.me()
print(f"Username: {me.username}")
for friend in me.friends:
print(f"Friend: {friend.username}")
Thanks for your help!
Kind regards
Timon Käch
please try a search username https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20
Greetings, when I tried to login using my phone number I got this error:
{'error': {'code': 400, 'message': 'APP_NOT_VERIFIED', 'errors': [{'message': 'APP_NOT_VERIFIED', 'domain': 'global', 'reason': 'invalid'}]}}
it seems so that this occurs on my country's numbers (Im From georgia), I tried temporary sms receiver french number and it worked. can you please tell me what could be causing it?
or can you please tell me how did you got access to those endpoints? did you used Mitm proxy? maybe I need to change header and user client.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.