oxlac / mr.dm Goto Github PK
View Code? Open in Web Editor NEWA quick and easy tool for automating your Instagram DMs.
Home Page: https://mr-dm.oxlac.com
License: MIT License
A quick and easy tool for automating your Instagram DMs.
Home Page: https://mr-dm.oxlac.com
License: MIT License
Describe the bug
This bug happens when a user sets their "get only dm messages from connected accounts" feature true. When this happens, the app gets confused and does not turn anything back.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We could expect application sending dm to that account and still send dms to other accounts we added.
Desktop (please complete the following information):
Additional context
This happens when an account we DM'd uses an instagram feature called "message requests". This means the person we DM'd should accept our message invite then see our message. This thing causes the problem in the application.
There needs to be a way for the application to import accounts from a particular hashtag. This includes two types of options:
There also needs to be a system in place that allows the user to enter the number the maximum number of posts they wish to target. This number also needs to be quite small (1-5) for the second kind of account imports(This is to prevent Insta from temp banning the bot's ip)
This can be implemented by using the instaloader hashtag classes and functionality. Fort reference:
Reference
Schedule the sending of DMs to a certain hour and timezeone by the minute
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Only the classes inside the backend
module has been properly documented. The other classes inside the ui
module and its submodules need to be documented.
This is a contribution that anyone can do with even minimal python knowledge. You need to read the code referencing various documentations of the used libraries and write documentation for the respective code block.
An example documentation block is
"""
.. image:: https://raw.githubusercontent.com/Oxlac/MR.DM/main/docs/images/login-screen.png
Welcome Screen/Login Screen Class. This screen contains methods that deal with adding new users and logging in existing users.
When an user launches the program for the first time,this scren will display no accounts.
"""
def get_user(self, userid: str) -> Tuple[str, str, str, str]:
"""
Gets the Instagram user from the database with the given userid.
:param userid: The userid of the user to get
:return: The user with the given userid
"""
c = self.conn.cursor()
c.execute("SELECT * FROM users WHERE userid=?", (userid,))
return c.fetchone()
MR.DM uses Sphinx AutoApi to generate documentation for all internal classes and functions. You can read more here.
In order for AutoApi to generate proper documentation it needs to know the datatypes of any function parameters, return values and class members. This can be done by using the python type hints definition. More info here
cd docs
./make html
docs/_build/html/docs.html
Proxy Rotation support
Hey Can you please help me with this error, the bot is getting stuck again and again. I don't know what is the reason but I think the UI of my instagram is a bit different from what I saw in screenshots. Please help
Exception in thread Thread-4 (_start_messages):
Traceback (most recent call last):
File "C:\Users\dashi\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\dashi\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
self._target(self._args, **self._kwargs)
File "C:\Users\dashi\OneDrive\Documents\GitHub\MR.DM\src\ui\progressscreen\progressscreen.py", line 241, in _start_messages
self.start_message_loop()
File "C:\Users\dashi\OneDrive\Documents\GitHub\MR.DM\src\ui\progressscreen\progressscreen.py", line 252, in start_message_loop
self.find_element(SELECTORS["new_dm_btn"]).click()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dashi\OneDrive\Documents\GitHub\MR.DM\src\ui\progressscreen\progressscreen.py", line 307, in find_element
return self.session.driver.find_element(By.XPATH, XPATH)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dashi\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 742, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dashi\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 348, in execute
self.error_handler.check_response(response)
File "C:\Users\dashi\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@ROLE= 'button'][.//div////*[text()='New message']]"}
(Session info: chrome=120.0.6099.217); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
GetHandleVerifier [0x00007FF7EEFF2142+3514994]
(No symbol) [0x00007FF7EEC10CE2]
(No symbol) [0x00007FF7EEAB76AA]
(No symbol) [0x00007FF7EEB01860]
(No symbol) [0x00007FF7EEB0197C]
(No symbol) [0x00007FF7EEB44EE7]
(No symbol) [0x00007FF7EEB2602F]
(No symbol) [0x00007FF7EEB428F6]
(No symbol) [0x00007FF7EEB25D93]
(No symbol) [0x00007FF7EEAF4BDC]
(No symbol) [0x00007FF7EEAF5C64]
GetHandleVerifier [0x00007FF7EF01E16B+3695259]
GetHandleVerifier [0x00007FF7EF076737+4057191]
GetHandleVerifier [0x00007FF7EF06E4E3+4023827]
GetHandleVerifier [0x00007FF7EED404F9+689705]
(No symbol) [0x00007FF7EEC1C048]
(No symbol) [0x00007FF7EEC18044]
(No symbol) [0x00007FF7EEC181C9]
(No symbol) [0x00007FF7EEC088C4]
BaseThreadInitThunk [0x00007FFBC7D2257D+29]
RtlUserThreadStart [0x00007FFBC9ACAA58+40]
Describe the bug
To Reproduce
Try to send a DM and:
[DEBUG ] Finished Request
Exception in thread Thread-4 (_start_messages):
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/opt/homebrew/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/Users/x/Desktop/git/mr.dm/src/ui/progressscreen/progressscreen.py", line 232, in _start_messages
if self.find_element(SELECTORS["save_login_info"]):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/x/Desktop/git/mr.dm/src/ui/progressscreen/progressscreen.py", line 311, in find_element
return self.session.driver.find_element(By.XPATH, XPATH)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 742, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 348, in execute
self.error_handler.check_response(response)
File "/opt/homebrew/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//button[text()='Save info']"}
(Session info: chrome=121.0.6167.85); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Expected behavior
a DM should be sent
Desktop (please complete the following information):
any
The ability to import target accounts based on their interactions with a post given the post URL.
This feature should allow the user to
https://instaloader.github.io/module/structures.html#instaloader.Post.get_comments
https://instaloader.github.io/module/structures.html#instaloader.Post.get_likes
Send images and videos as messages.
Needs Discussion on how ethically safe this is.
Describe the bug
I am not sure if it's something that has to do with the selectors. The Bot is supposed to proceed with the DM, but gets stuck after entering name of User.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After input its supposed to send the DM.
Screenshots
[DEBUG ] Finished Request
Exception in thread Thread-5 (_start_messages):
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\threading.py", line 1052, in _bootstrap_inner
self.run()
File "C:\Program Files\Python312\Lib\threading.py", line 989, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Wombaterino\Desktop\MR.IG\MR.DM\src\ui\progressscreen\progressscreen.py", line 245, in _start_messages
self.start_message_loop()
File "C:\Users\Wombaterino\Desktop\MR.IG\MR.DM\src\ui\progressscreen\progressscreen.py", line 266, in start_message_loop
self.find_element(SELECTORS["dm_select_user"].format(user[1])).click()
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\webelement.py", line 94, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\webelement.py", line 395, in _execute
return self._parent.execute(command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <span class="x1lliihq x193iq5w x6ikm8r x10wlt62 xlyipyv xuxw1ft">...</span> is not clickable at point (193, 286). Other element would receive the click: <div class="x1qjc9v5 x9f619 x78zum5 xdt5ytf x1iyjqo2 xl56j7k" style="--card-background: rgb(var(--ig-primary-background)); --comment-background: rgb(var(--ig-highlight-background)); --filter-primary-icon: invert(100%); --messenger-card-background: rgb(var(--ig-primary-background)); --mwp-message-list-actions-width: 96px; --mwp-message-row-background: rgb(var(--ig-primary-background)); --primary-text: rgb(var(--ig-primary-text));">...</div>
(Session info: chrome=121.0.6167.184)
Stacktrace:
GetHandleVerifier [0x00007FF789277012+3522402]
(No symbol) [0x00007FF788E98352]
(No symbol) [0x00007FF788D45ABB]
(No symbol) [0x00007FF788D93390]
(No symbol) [0x00007FF788D910D2]
(No symbol) [0x00007FF788D8E834]
(No symbol) [0x00007FF788D8D569]
(No symbol) [0x00007FF788D81910]
(No symbol) [0x00007FF788DAF05A]
(No symbol) [0x00007FF788D8120A]
(No symbol) [0x00007FF788DAF270]
(No symbol) [0x00007FF788DCBDA3]
(No symbol) [0x00007FF788DAEE03]
(No symbol) [0x00007FF788D7F4D4]
(No symbol) [0x00007FF788D805F1]
GetHandleVerifier [0x00007FF7892A9B9D+3730157]
GetHandleVerifier [0x00007FF7892FF02D+4079485]
GetHandleVerifier [0x00007FF7892F75D3+4048163]
GetHandleVerifier [0x00007FF788FCA649+718233]
(No symbol) [0x00007FF788EA4A3F]
(No symbol) [0x00007FF788E9FA94]
(No symbol) [0x00007FF788E9FBC2]
(No symbol) [0x00007FF788E8F2E4]
BaseThreadInitThunk [0x00007FF82B8E7344+20]
RtlUserThreadStart [0x00007FF82D8426B1+33]
AFTER I CLOSE THE SCRIPT LOG:
[INFO ] [Base ] Leaving application in progress...
Traceback (most recent call last):
File "C:\Users\Wombaterino\Desktop\MR.IG\MR.DM\src\main.py", line 67, in <module>
MyApp().run()
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\app.py", line 956, in run
runTouchApp()
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\base.py", line 339, in mainloop
self.idle()
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\base.py", line 379, in idle
Clock.tick()
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\clock.py", line 733, in tick
self.post_idle(ts, self.idle())
^^^^^^^^^^^
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\clock.py", line 689, in idle
usleep(1000000 * sleeptime)
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\clock.py", line 965, in usleep
_usleep(microseconds, self._sleep_obj)
File "C:\Users\Wombaterino\AppData\Roaming\Python\Python312\site-packages\kivy\clock.py", line 504, in _usleep
_kernel32.WaitForSingleObject(obj, 0xffffffff)
KeyboardInterrupt
Desktop (please complete the following information):
Any
Installed, added the account and selected the users to send the message. Then it pops up a new window of my browser with IG and logs in but that's it. Never gets to sending any dm whatsoever.
The ability to import an account to a list by the use of the user profile link directly copied from Instagram. Ideally this link will also be checked to make sure the user is added properly to prevent the bot from failing at a later stage.
Eg Profile Link: https://www.instagram.com/oxlac_/
Please support 2FA for adding account
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.