yazeed44 / social-media-detector-api

This api would allow you to check if a phone number has a certain social media app
152 stars 23 forks source link

Whatsapp will need authorization to your account. Scan the shown qr code. You might need to restart the program after scanning the qr code #7

Open alabbas-ali opened 2 years ago

alabbas-ali commented 2 years ago

I run the code like:

python3 Main.py number1 number2

Error thrown:

Whatsapp will need authorization to your account. Scan the shown qr code. You might need to restart the program after scanning the qr code
2021/11/01 15:46:43 error logging in: error during login: error decoding login resp: json: cannot unmarshal array into Go value of type map[string]interface {}

exit status 1
2021/11/01 15:46:44 error logging in: error during login: error decoding login resp: json: cannot unmarshal array into Go value of type map[string]interface {}

exit status 1
Traceback (most recent call last):
  File "Main.py", line 35, in <module>
    main()
  File "Main.py", line 29, in main
    detector.detect()
  File "/home/alabbas/workspace/social-media-detector-api/SocialDetector.py", line 10, in detect
    app.process()
  File "/home/alabbas/workspace/social-media-detector-api/Whatsapp.py", line 42, in process
    self.detect_numbers(self.phone_numbers_to_detect)
  File "/home/alabbas/workspace/social-media-detector-api/Whatsapp.py", line 37, in detect_numbers
    phone.set_app_state(self.get_name(), AppUsageEnum.USAGE if "\"status\":200" in result_decoded[index] else AppUsageEnum.NO_USAGE)
IndexError: list index out of range

Am i missing something here. Also way there is python code that runs go code. wont it by a better idea if all written in go or Python ??

MuhammadAamer commented 2 years ago

Hello I am Aamer. Has someone solved this problem i am also facing this issue.