Python Forum
[Idea Required] How can i track any change on a webpage?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Idea Required] How can i track any change on a webpage?
#1
Hi,

i wish to write a python scripts which will have the ability to track webpage pages and if any change that will happen it will save those changes on csv.

Below are the things i am willing to implement but requires ideas:
1. A python script that can track changes
2. What are the libraries required
3. How to compare changes and get only thing that have changed?
4. How to display changes also?

any idea on it from where i can start would be helpful? Wall
Reply
#2
I would just pull the website html via requests module every X number of times (requests because its better than standard library stuff) and difflib module for comparing the two html to get the difference between them. difflib will return similar info like git about changes of a string. What was added/removed/etc. difflib even has an embedded html difference class difflib.HtmlDiff()
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Use Python to change a PHP file on my little webpage Pedroski55 0 1,481 Aug-28-2021, 12:42 AM
Last Post: Pedroski55
  Python script to only keep waypoints within x km from track? Winfried 0 1,511 Sep-18-2020, 08:47 AM
Last Post: Winfried
  Program to keep track of reading time test 3 2,405 Apr-08-2020, 08:38 AM
Last Post: snippsat
  [GPX] Read all trkpt, and merge into single track? Winfried 0 1,521 Jan-30-2020, 04:08 PM
Last Post: Winfried
  Select next file in directory and keep track of what's already been selected loganpmgoa 2 2,851 Feb-27-2019, 11:54 PM
Last Post: loganpmgoa

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020