Git Product home page Git Product logo

instagram-auto-dm's People

Contributors

el-pr0f3ss0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

instagram-auto-dm's Issues

can you update the browser selector elements THEN WE'RE GOLDEN! ๐Ÿ—ก๏ธ

can you update the browser selector elements THEN WE'RE GOLDEN

DevTools listening on ws://127.0.0.1:53989/devtools/browser/2bff3963-5f92-4340-9670-71acebba18f8
[3108:11824:0527/151204.206:ERROR:device_event_log_impl.cc(214)] [15:12:04.207] Bluetooth: bluetooth_adapter_winrt.cc:1074 Getting Default Adapter failed.
Traceback (most recent call last):
File "C:\Users\Paul\Downloads\Instagram DM Test\DMer.py", line 90, in
schedule.run_pending()
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\schedule_init_.py", line 780, in run_pending
default_scheduler.run_pending()
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\schedule_init_.py", line 100, in run_pending
self.run_job(job)
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\schedule_init
.py", line 172, in run_job
ret = job.run()
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\schedule_init
.py", line 661, in run
ret = self.job_func()
File "C:\Users\Paul\Downloads\Instagram DM Test\DMer.py", line 66, in dmer
send_msg(usrnamee)
File "C:\Users\Paul\Downloads\Instagram DM Test\DMer.py", line 42, in send_msg
chk_mrk = browser.find_element_by_class_name('dCJp8')
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 564, in find_element_by_class_name
return self.find_element(by=By.CLASS_NAME, value=name)
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Paul\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".dCJp8"}
(Session info: chrome=102.0.5005.63)

THE CODE REFERS TO THESE OLD PATH ELEMENTS:
def send_msg(usrnames):
browser.get('https://www.instagram.com/direct/new/')

    time.sleep(5)

    to_btn = browser.find_element_by_name('queryBox')
    to_btn.send_keys(usrnames)

    time.sleep(8)

    chk_mrk = browser.find_element_by_class_name('dCJp8')
    chk_mrk.click()

    time.sleep(3)

    nxt_btn = browser.find_element_by_xpath('//div[@class="mXkkY KDuQp"]')
    nxt_btn.click()

    time.sleep(6)

    txt_box = browser.find_element_by_tag_name('textarea')
    txt_box.send_keys(f" @{usrnames} my custom message here @username  ")  # Customize your message

    time.sleep(2)

    snd_btn = browser.find_elements_by_css_selector('.sqdOP.yWX7d.y3zKF')
    snd_btnn = snd_btn[len(snd_btn)-1]
    snd_btnn.click()

    time.sleep(4)

count = 0
try:
    for usrnamee in usrnames:
        send_msg(usrnamee)
        count += 1

except TypeError:
    print('Failed!')

browser.quit()

print(f'''
Successfully Sent {count} Massages
''')

x += 1

timee = "15:12" # Specific Time When The message will be send

try:
schedule.every().day.at(timee).do(dmer)
except TypeError:
pass

try:
while True and x != 1:
schedule.run_pending()
time.sleep(1)
except UnboundLocalError:
pass

problems with the button

hello,

I have problems with the button

Traceback (most recent call last):
  File "mensaje_dm.py", line 91, in <module>
    dmer()
  File "mensaje_dm.py", line 74, in dmer
    send_msg(usrnamee)
  File "mensaje_dm.py", line 67, in send_msg
    snd_btnn.click()
  File "C:\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "C:\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "C:\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button class="sqdOP yWX7d    y3zKF     " type="button">...</button> is not clickable at point (923, 909). Other element would receive the click: <div class="rh7Wz">...</div>
  (Session info: chrome=87.0.4280.88)

Read DMs?

I love that this program allows you to send dm messages to people but I also wondered whether it could be used to read dm messages and print them. Is this possible or is the task to unpredictable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.