-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Request: Twitter notifications #31
Comments
I'll see how difficult it is and hopefully have a look at it this weekend. Since Twitter restricts you to 140 characters or less. Space is somewhat very limited, what did you want to be displayed inside the tweet? |
Successful or failed download and file name. |
Thanks for your feedback! So do you think this new enhancement should provide both public tweets and DMs, or just DMs? I'm thinking just private DMs might be the best way to go? What are your thoughts? Meanwhile I'll investigate zapier (as you mentioned) and other frameworks and see what can be put together. |
I personally prefer DM but having two command strings (one for each) would give user options which options are always great. |
I think i just completed the task! 😄. Have a go at the master branch and let me know how it goes. The syntax is: This is presuming you set up yourself an app correctly on https://apps.twitter.com and generated you a set of Access Tokens! I was able to send myself a Direct Message (i have not added public tweets yet). If i do implement it, the syntax will be the same, but you'll add ?public=True to the end of the URL. At this point, I'll just be curious to hear your feedback! |
wow that was fast. thanks. Question is the section for "user@". Is it supposed to be replaced with "@user" or just "user" and is it sending user or receiving user? |
For SABnzbd you want to choose the special wrapper script (sabnzbd-notify.py); but Notify.py and the Notify directory both need to be present too (all in the same directory). Then when you fill out the Notification argument, you'll need to put tweet://user@/ConsumerKey/ConsumerSecret/AccessTokenKey/AccessTokenSecret/ in the field. You'll need to substituting all the values with what you got from Twitter. The user can be your twitter identifier (without the @ symbol in front of it) or it can be the Owner Identifier which you can find out from the same screen your Keys are located at. I realize this seems backwards for twitter, but it's actually the correct syntax for a web page URIs. If you have access to a terminal, you can change to the directory/of/sabnzb/scripts/ and type: # Test your command manually (without SABnzbd)
python Notify.py -s tweet://user@/ConsumerKey/ConsumerSecret/AccessTokenKey/AccessTokenSecret/
# Or, do the same command with the -D switch to see more debugging information that
# may or may not help you, but it may help me (if you belive the problem is still in the script)
python Notify.py -D -s tweet://user@/ConsumerKey/ConsumerSecret/AccessTokenKey/AccessTokenSecret/ |
fixed the script, selection, changed the user which i had a different user. Now i have the user that belongs to the keys. |
Weird, SABnzbd relies on Python, does it not? You could make sure it's a part of your Windows installation; get it here. Then giver another go! :) |
ok, python installed. python install directory added to windows path. now python recognized in CMD. But i had python Notify.py -D -s tweet://sickbeard9/key/secret/key/secret |
Server parsed to: {'host': 'sickbeard9', 'user': None, 'query': None, 'url': 'tweet://sickbeard9/ |
I restarted the PC and test passed in Sab, but nothing arrived in Twitter.
but same error as before from CMD: |
Your problem is here. Try this instead # Note that the user you dm (sickbeard9 in this case)
# must have an @ symbol following it, not a slash (/)
Notify.py -D -s tweet://sickbeard9@key/secret/key/secret |
Thanks. Made the switch. Passed all tests. Will know for sure once something downloads.
|
ok downloads work, get the DM successfully.
|
Hmm, this is really weird... so first it works... but then it spits out an error that it didn't 😕 What version of SABnzbd are you using? 2.3.0? What do you have in the other Notify.py fields? Perhaps you have a space somewhere or more content in your Arguments entry? It accepts more then one (so you can notify more then 1 thing) if you just keep adding more urls. Perhaps there is a bad url at the end? I might need more time to figure this out because you have me scratching my head. Hopefully I'll have figured it out sometime this weekend. Do you have any other details you can throw at me while i try to reproduce this? Anything at all is useful at this point... |
I have no other strings in that parameter field. I will check for spaces at beginning or end but it looks like it's complaining about a comma which ibdont have. |
I'm unable to reproduce your problem at all. I keep getting all of the notifications as expected (just like you said you are). But the difference is, I don't see any errors in my logs. One thing you could do is:
The fact that the main notifications are working tells me that SABnzbd just isn't passing in the correct parameters for some strange scenario. I have to assume that your logs have a lot of successful notification messages surrounding the one your inquiring about? |
thanks for the help and it has been working perfectly since. |
I'm from Canada too! Happy Thanksgiving! 😄 I'm going to close off this ticket now. Feel free to reopen it or create another if you have any more questions or issues! |
solved the issue on the SAb forums. Did you look into Zapier? https://zapier.com/app/explore |
Briefly, i ended up solving your request using another library that gives you unlimited posts to Twitter. But i did check Zapier out! It looks like they have lots of apps they can plug you into! |
I used to use a twitter notification setup from this url https://forums.sabnzbd.org/viewtopic.php?f=9&t=17999&p=98578&hilit=twitter#p98578
but this past week it has stopped working with error:
Notification script returned exit code 255 and output " C:\Program Files\SABnzbd>CLS C:\Program Files\SABnzbd>SET status= C:\Program Files\SABnzbd>SET zero=0 C:\Program Files\SABnzbd>SET filename="Test Notification" 0 was unexpected at this time. C:\Program Files\SABnzbd>IF EQU 0 (GOTO :SUCCESS) ELSE (GOTO :FAIL) "
Would be excellent if your awesome notify service could include twitter
The text was updated successfully, but these errors were encountered: