Comments (2)
One quick and pragmatic way to do this would be to write a small script that generates the urls.yaml
from a "template" that you specified like above. This way, you can make it as complex and/or powerful as you want.
The suggestion you had doesn't properly work if e.g. you want to give different URLs different names or something. On the other hand, for this simple case of turning the "url" field into a list, it could work. The job parser needs to be updated to deal with that properly, though (probably the job parser would go and "expand" the data accordingly, so that practically the rest of the codebase "sees" distinct jobs that just happen to have the same filter configuration).
Keeping this open for now as feature idea for the future.
from urlwatch.
Perhaps this will help @jwilk or others searching for a solution.
I generally use the global job_defaults
to apply the same filters to all my URLs (docs). If I have a few URLs that need an additional filter step or perhaps a few URLs that need a certain filter step skipped, I use a custom SelectiveFilter. This is obviously just for my use case, but perhaps the idea can be generalized.
This custom SelectiveFilter allows you to define a list of regex patterns to match. A defined conventional filter is then applied selectively depending on the results of that match.
Not exactly what you want, but I think the concept of making a custom filter in your hooks.py
and giving that filter some logic to either apply itself or not is a workable solution.
from urlwatch.
Related Issues (20)
- [pyppeteer] No module named 'pyppeteer' using Docker python3.10 bookworm HOT 1
- Reporting blanks HOT 28
- add support to specify multiple recipients per URL HOT 7
- YAML Anchors/Aliases not working HOT 4
- CSS Filter "AttributeError: 'CSSSelector' object has no attribute 'evaluate'" HOT 2
- FEATURE: Support multiple reporters with different options HOT 6
- Meaning of max_tries is confusing
- urlwatch stopped working HOT 4
- sendmail is not documented HOT 2
- Randomly "not enough values to unpack" Python errors HOT 4
- Cache inconsistency creating new items from nowhere HOT 3
- Feature request: Extension of regex filtering to extract data HOT 7
- Consider releasing version 2.29 HOT 5
- Question - Report http errors only once HOT 5
- urlwatch 2.25-1 on Debian Stable 12.5 (navigate fails) HOT 3
- Enable/disable job from the command line HOT 1
- urlwatch moans when supplying --config HOT 1
- urlwatch 2.25 - AttributeError: 'list' object has no attribute 'read' HOT 2
- XML parsing with CDATA not working HOT 6
- urlwatch 2.28: html: separate: true not sending separate emails 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.