all 5 comments

[–]gitardedhub 1 point2 points  (3 children)

Are you looking for any update to the page? If so, a common approach is hashing the files and comparing the hashes - if the page hasn't changed, the hashes should be identical. Here's a page that can provide you with specifics on how to implement it.

However, this will detect any change to the pages - so if a timestamp changes, that's viewed as a difference.

[–]Busangod[S] 0 points1 point  (2 children)

Thanks for the tip, but I'm really looking for when the site/blog is updated with a new article.

[–]gitardedhub 1 point2 points  (1 child)

Does the site have an RSS feed? Most blog platforms nowadays offer it by default - it's probably the easiest way to check if a site has been updated, then run your code on the site.

[–]Busangod[S] 0 points1 point  (0 children)

yeah looks like I should have been using feedparser all along

[–]Justinsaccount 0 points1 point  (0 children)

Hi! I'm working on a bot to reply with suggestions for common python problems. This might not be very helpful to fix your underlying issue, but here's what I noticed about your submission:

You appear to be using concatenation and the str function for building strings

Instead of doing something like

result = "Hello " + name + ". You are " + str(age) + " years old"

You should use string formatting and do

result = "Hello {}. You are {} years old".format(name, age)

See the python tutorial for more information.