-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Same question: Send image and video :) #1710
Comments
hi sowerkoku, |
would edit the yowsup-cli and add image and video. I think it's as easy. |
I am sorry but as java developer i can't understand where to insert the right code. |
Image and video are currently not really supported by yowsup. See #1564. |
Hi all,
i am trying to send an image or a video.
Ok there are hundreds of thread i know but i can't figure out how to do it :(
I had tried with yowsup-cli demos with -x parameters but i had received this message
demos: error: unrecognized arguments: -x [PHONENUMBER] [IMAGEPATH]
running command:
sudo yowsup-cli demos -c [CONFIGFILE] -x [PHONENUMBER] [IMAGEPATH]
So i read this guide: https://github.com/tgalal/yowsup/wiki/Upload-and-send-Media and i figured out that i have to write a python script.
layer.py Class
`# -- coding: utf-8 --
import os, subprocess, time,re
import RPi.GPIO as GPIO
GPIO.setwarnings(False)
from yowsup.layers import YowLayer
from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
from yowsup.layers.protocol_messages.protocolentities import TextMessageProtocolEntity
from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEntity
from yowsup.layers.protocol_acks.protocolentities import OutgoingAckProtocolEntity
from yowsup.layers.protocol_media.protocolentities import *
from yowsup.layers.protocol_media.mediauploader import MediaUploader
from yowsup.layers.protocol_profiles.protocolentities import *
from subprocess import PIPE
from yowsup.layers.auth import YowAuthenticationProtocolLayer
from yowsup.layers import YowLayerEvent
from yowsup.layers.network import YowNetworkLayer
import sys, getopt
from yowsup.common import YowConstants
import datetime
import os
import logging
from yowsup.layers.protocol_receipts.protocolentities import *
from yowsup.layers.protocol_groups.protocolentities import *
from yowsup.layers.protocol_presence.protocolentities import *
from yowsup.layers.protocol_messages.protocolentities import *
from yowsup.layers.protocol_acks.protocolentities import *
from yowsup.layers.protocol_ib.protocolentities import *
from yowsup.layers.protocol_iq.protocolentities import *
from yowsup.layers.protocol_contacts.protocolentities import *
from yowsup.layers.protocol_chatstate.protocolentities import *
from yowsup.layers.protocol_privacy.protocolentities import *
from yowsup.layers.protocol_media.protocolentities import *
from yowsup.layers.protocol_media.mediauploader import MediaUploader
from yowsup.layers.protocol_profiles.protocolentities import *
class Bracco(YowInterfaceLayer):
funzioni per l'upload di immagini
run.py
`from yowsup.stacks import YowStackBuilder
from layer import bracco
from yowsup.layers.auth import AuthError
from yowsup.layers import YowLayerEvent
from yowsup.layers.network import YowNetworkLayer
from yowsup.env import YowsupEnv
import sys, getopt
credentials = ([PHONENUMBER], [PASSWORD]) # replace with your phone and password
CREDENTIALS = DemosArgParser._getCredentials()
if name== "main":
stackBuilder = YowStackBuilder()
oggetto.image_send is called and executed (i see log on shell) but image is not send to the phone.
What am i missing?
thank you for your help.
Jacopo
The text was updated successfully, but these errors were encountered: