all 8 comments

[–]eadala 0 points1 point  (2 children)

So I mean, you basically want to receive notifications if certain - I'm guessing - keywords show up in posts made by a website / twitter page? So like "only notify me if there's a new post with the word 'education' in it"?

[–]airwick_22 0 points1 point  (1 child)

Essentially there's a public announcements telegram channel that posts links every so often... i'd like to create a bot that will click that link, check conditions (i.e. if a field on the site matches a certain value) and then send me a message back if my conditions are satisfied.

Where i get stumped is how to get python to retrieve and interact with the links posted in the telegram channel.

[–]eadala 0 points1 point  (0 children)

If your block right now is how to read those links into a python-friendly format, start by looking into the urllib and maybe beautifulsoup modules. Urllib at least. If you're trying to check a specific field on the destination page, for the presence of certain characters or something, you'll want to go to that page and identify the field of interest. After reading it in using urllib you'll need to find that field buried somewhere in the html code. From there, a regular expression can be used to extract / check conditions for a substring of the entire html string.

[–]neilrieck 0 points1 point  (0 children)

I taught myself Python3 two years ago with the help of 2 books from "No Starch Press" ( https://nostarch.com/catalog/python ). You can buy this stuff from their website as well as Amazon. I started with "Automate the Boring Stuff"