Title: Quote/Keyword/Reply/Topic Notifier Post by: edgycorner on May 24, 2019, 03:14:48 PM A bot which will notifies you about:
It uses pushbullet app(available on both iPhone and android), or Telegram to send notifications. Like this: https://i.imgur.com/wQrwc3e.jpg Make sure to pip install these two libraries: pushbullet.py bs4 After installing these two libraries, copy/paste and run the code Here is the code: No need to edit anything in the script. Code:
You can find API token of your pushbullet account here: https://www.pushbullet.com/#settings/account If you are using telegram as notification method instead of Pusbullet, you will need a Bot token ID and your CHAT ID. Here's how to procure these two things: 1.)Use godfather to create a new bot and note down its token ID. Make sure to send a /start message to that bot. 2.)Send a message to @RawDataBot, it will reply back with your Chat ID. See pic https://i.imgur.com/TsFUsFB.png You can install Termux on your phone, to run this script 24*7 by using termux-wake-lock (Haven't tested it yet but should work, it might drain your battery) It's better to use the script on your PC, by installing python on it. I will be adding a new update for sock usage, so that you can run it on a VPS. You won't be able to run this script on a VPS for now because cloudflare won't let a datacenter IP address to scrap recent pages. Reply here, if you face any problem. Title: Re: Simple python script that notifies about new replies or topics at bitcointalk Post by: TryNinja on May 24, 2019, 04:00:47 PM Great Job! I actually prefer Pushbullet over Telegram (which most people use).
Could you add an option to scrape posts in the “recent” page? That would allow to search for keywords direclty on posts instead of just thread titles. Title: Re: Simple python script that notifies about new replies or topics at bitcointalk Post by: edgycorner on May 24, 2019, 06:44:46 PM Great Job! I actually prefer Pushbullet over Telegram (which most people use). And People won't be comfortable to use their bots key on someone else's script, if they don't know programming.Could you add an option to scrape posts in the “recent” page? That would allow to search for keywords direclty on posts instead of just thread titles. Very good suggestion, I didn't even think about it.Will add it someday, for sure.Title: Re: Simple python script that notifies about new replies or topics at bitcointalk Post by: TryNinja on May 24, 2019, 07:29:01 PM Nice job! But looks like it requires users need computer/server which run 24/7 if you need continuous notification, right? I’m not sure if it would work, but you can try “hosting” your python script with PythonAnywhere[1]. It’s free and you can make the script work without having your PC on all day.I wonder if the script would run on QPython3/Pydroid 3 out-of-the-box? [1] https://www.pythonanywhere.com/ Title: Re: Simple python script that notifies about new replies or topics at bitcointalk Post by: edgycorner on May 25, 2019, 12:08:22 PM https://www.pythonanywhere.com/ Unfortunately, pythonanywhere has blacklisted bitcointalk.Nice job! But looks like it requires users need computer/server which run 24/7 if you need continuous notification, right? It worked with Pydroid 3, just make sure to pip install bs4 and pushbullet.pyI wonder if the script would run on QPython3/Pydroid 3 out-of-the-box? Title: Re: Quote/Keyword/Reply/Topic Notifier Post by: edgycorner on May 29, 2019, 07:20:00 PM The bot has been updated.
Updates:
You can PM me or reply here, if you are unable to run the script. Title: Re: Quote/Keyword/Reply/Topic Notifier Post by: wwzsocki on December 14, 2019, 08:12:59 AM ...Anyone can use the script, even with no knowledge about programming... I am not so sure. I was using it until now Maggiordomo (https://bitcointalk.org/index.php?topic=5023605) bot from member Piggy but lately stopped to work so I started to look for an alternative and of course, found your thread. Maggirordomo bot was very easy to set up (just look in the thread), anyways many times multiple people found even this setup too hard and were confused. Once I even made a short tutorial with screens because there were so many questions and confused members who couldn't get the bot to run and this required only to send a message, to be honest. I will be happy to know if there is any way to get your bot working with the Telegram desktop app to receive notifications or is it only possible on the phone? Title: Re: Quote/Keyword/Reply/Topic Notifier Post by: edgycorner on May 04, 2022, 07:15:26 PM I had to use this script again, so made some changes to make it more efficient and updated the original post with it.
Changes made: >Added Telegram as a notification mode >The bot will now scrap recent pages after ever 20 seconds compared to 2 seconds in previous version, to eliminate any bot like behavior and reduce unnecessary load on bitcointalk server. >Bot will go into sleep for 5 minutes after making a notification. Again, did this to reduce any unnecessary scrapping of bitcointalk >A few changes in how the bot reads title input Might add in future: Socks5 usage :D Title: Re: Quote/Keyword/Reply/Topic Notifier Post by: Welsh on May 13, 2022, 10:29:03 AM >The bot will now scrap recent pages after ever 20 seconds compared to 2 seconds in previous version, to eliminate any bot like behavior and reduce unnecessary load on bitcointalk server. I think reducing that even further by default probably wouldn't be an issue. Not many users here need to be notified that quickly. You could probably ramp it up to two minutes, five minutes or even ten minutes. For example, when I go on expeditions, and use a satellite communicator, that has the option for two minutes, ten minutes, and 30 minutes, and I usually stick it on the ten minute one as it doesn't kill the battery too quickly, and is still decent enough. I know this is slightly different, but how many times does someone reply to your thread or post within a minute? Probably not often. Also, while this might have worked for a while now, changing the time to wait would likely help future proof it, if theymos ever decides to change the request rate limit, since to me twenty seconds is quite quick, and doesn't give you much leeway. Although, is definitely an improvement over the two second limit. Title: Re: Quote/Keyword/Reply/Topic Notifier Post by: edgycorner on May 13, 2022, 05:17:17 PM >The bot will now scrap recent pages after ever 20 seconds compared to 2 seconds in previous version, to eliminate any bot like behavior and reduce unnecessary load on bitcointalk server. I think reducing that even further by default probably wouldn't be an issue. Not many users here need to be notified that quickly. You could probably ramp it up to two minutes, five minutes or even ten minutes. For example, when I go on expeditions, and use a satellite communicator, that has the option for two minutes, ten minutes, and 30 minutes, and I usually stick it on the ten minute one as it doesn't kill the battery too quickly, and is still decent enough. I know this is slightly different, but how many times does someone reply to your thread or post within a minute? Probably not often. Also, while this might have worked for a while now, changing the time to wait would likely help future proof it, if theymos ever decides to change the request rate limit, since to me twenty seconds is quite quick, and doesn't give you much leeway. Although, is definitely an improvement over the two second limit. Will replace it with 3 minutes next week :D Title: Re: Quote/Keyword/Reply/Topic Notifier Post by: TryNinja on July 28, 2022, 10:01:24 PM Yup, 20 seconds is still too frequent for an update check. If you only check the "recent posts" page every 3 minutes, won't you miss out on a lot of posts, as it only shows the last 10 posts (unless you go through the 10 pages = last 100 posts)? How does that work?Will replace it with 3 minutes next week :D |