Comments (6)
The next version will have two additional filters that will help here:
sha1sum
- Takes the retrieved content and returns the sha1sum as hexdigesthexdump
- Takes the retrieve content and returns a hexdump-like representation
The hexdump output doesn't include file offsets, as otherwise the diffs will be quite large.
from urlwatch.
You can do this for local files by just piping it into sha1sum
or a similar tool or even hexdump
if you want to see which bytes change. For things like PDF you can also pipe it through a tool that converts the PDF to text, so you can even see text changes.
from urlwatch.
Is there a way for remote files, too? This would my use case.
from urlwatch.
This is probably a bad idea for a number of reasons, but perhaps something like the following would work for your particular use case?
curl -Is URL | awk '$1 ~ /Last-Modified:/ {sub(".*: ", ""); print}'
from urlwatch.
@thp Thanks, sha1sum solves my usecase perfectly.
from urlwatch.
Note that this will still download the file every time fully when watched. A more efficient solution would be to only do a HEAD request and then use either ETag or Last-Modified as suggested by @brbsix, but we do not have that feature (getting HTTP headers) yet. We do already support specifying the HTTP method, so maybe if it's HEAD, the content should be the raw headers, since the body will always be empty, anyway.
from urlwatch.
Related Issues (20)
- Feature request: Custom AWS (requests) Authentication HOT 7
- Feature request: get notified if an http code changes HOT 1
- newer html2text dropped -utf8 switch HOT 1
- Applying same options to multiple URLs HOT 2
- Package for APK to run on android HOT 1
- possible to have colored diff output on the matrix reporter? HOT 2
- Documentation example for Github tags stopped working. HOT 3
- How Do I Install on Win 10? HOT 1
- How to handle errors like "Connection broken: IncompleteRead" HOT 2
- Browser Job not working HOT 5
- HtmlReporter uses invalid css color HOT 1
- RequestsDependencyWarning: urllib3 HOT 4
- Feature request: error threshold HOT 2
- TypeError: string indices must be integers HOT 2
- UnicodeDecodeError: 'charmap' codec can't decode byte
- Shell reporter not working HOT 5
- --gc-cache does not delete unused keys from redis db HOT 2
- Keye
- KeyError thrown when using default config YAML HOT 8
- Watching webpage that needs a session cookie HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urlwatch.