powerjungle / fbridge-asyncio Goto Github PK
View Code? Open in Web Editor NEWfacebook bridge used with matterbridge
Home Page: https://github.com/42wim/matterbridge
License: BSD 3-Clause "New" or "Revised" License
facebook bridge used with matterbridge
Home Page: https://github.com/42wim/matterbridge
License: BSD 3-Clause "New" or "Revised" License
I made today bridge between Telegram and Messenger using matterbridge.
Everything is working fine, but I am unable to send pictures. Receiving of images is working.
INFO:root:From api received json: {'text': '', 'channel': '-************', 'username': '', 'userid': '***********', 'avatar': '', 'account': 'telegram.messenger', 'event': '', 'protocol': 'telegram', 'gateway': 'Veronika', 'parent_id': '', 'timestamp': '2021-01-24T20:25:32.017259209+01:00', 'id': '', 'Extra': {'file': [{'Name': 'photo_2021-01-24_20-24-57.jpg', 'Data': ' ........ Here was the data ......', 'Comment': 'test', 'URL': '', 'Size': 0, 'Avatar': False, 'SHA': ''}]}} INFO:root:From api sending message: username: | text: ERROR:root:#1545023 Správa sa nedá poslať: Zdá sa, že sa pokúšate poslať prázdnu správu. Napíšte svoju správu a skúste to znova.
That error is talking that I am trying to send empty message
Paullux@dvkbuntu:~/fbridge-asyncio$ python3 fbridge-asyncio.py
INFO:root:Logging started
INFO:root:Found empty fb_dtsg, the session was probably invalid.
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fcded98c0d0>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fcded9a57c0>, 3775571.95251181)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fcded98c100>
ERROR:root:Session could not be loaded, login instead!
Password:
Traceback (most recent call last):
File "fbridge-asyncio.py", line 325, in <module>
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "fbridge-asyncio.py", line 304, in main
session = await fbchat.Session.login(getpass.getuser(), getpass.getpass())
File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_session.py", line 416, in login
raise _exception.NotLoggedIn(error)
fbchat.NotLoggedIn: Le mot de passe entré est incorrect. Vous l’avez oublié ?
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fcded98c130>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fcded9b9e20>, 3775579.56332407)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fcded98c0d0>
Hello i've been using this script for days now, however i can't manage to deploy it on Heroku with my matterbridge bot, because whenever i turn the bot on i get attribute errors like this one, i changed the filename to 'fb.py' to think that this might be the issue....
heroku[worker.1]: State changed from starting to up
2021-02-26T16:20:27.993899+00:00 app[worker.1]: Traceback (most recent call last):
2021-02-26T16:20:27.994046+00:00 app[worker.1]: File "fb.py", line 382, in
2021-02-26T16:20:27.994625+00:00 app[worker.1]: asyncio.run(main())
2021-02-26T16:20:27.994807+00:00 app[worker.1]: AttributeError: module 'asyncio' has no attribute 'run'
any tips or ideas on how to fix this? anyways thanks for this bridge i really appreciate it.
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.