Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter for autoindex.php sites? #2

Closed
oe3jtb opened this issue Dec 27, 2020 · 3 comments
Closed

filter for autoindex.php sites? #2

oe3jtb opened this issue Dec 27, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@oe3jtb
Copy link

oe3jtb commented Dec 27, 2020

Hi
eg this site
https://dd1go.de/file.php?dir=RT73/
is powered by autoindex
so every time you run webchanges
you got

CHANGED: Index von ./RT73/ ( https://dd1go.de/file.php?dir=RT73/ )

--- @ Sun, 27 Dec 2020 11:27:53 +0100
+++ @ Sun, 27 Dec 2020 11:28:36 +0100
@@ -418,7 +418,7 @@
Copyright (C) 2002-2007 Justin Hagstrom
http://autoindex.sourceforge.net

-Page generated in 46.7 milliseconds.
+Page generated in 97.3 milliseconds.

tnx in advance

@mborsetti
Copy link
Owner

mborsetti commented Dec 27, 2020

Hello @oe3jtb,

Assuming you don't care about the line containing "Page generated in ", I suggest filtering it out using delete_lines_containing:

name: "Index von ./RT73/"
url: https://dd1go.de/file.php?dir=RT73/
filter:
  - html2text:
  - delete_lines_containing: "Page generated in "

Or, using a regular expression that's even more targeted:

name: "Index von ./RT73/"
url: https://dd1go.de/file.php?dir=RT73/
filter:
  - html2text:
  - delete_lines_containing:
      re: 'Page generated in ([0-9.])* milliseconds.'

That way you don't get notified when it changes.

Please let me know if it works by updating this issue with the results, and closing it if the suggestion works!

Thanks.

@mborsetti mborsetti added the good first issue Good for newcomers label Dec 27, 2020
@mborsetti
Copy link
Owner

One more solution: using re.sub to replace the changing data with something else (in the example below, X):

name: "Index von ./RT73/"
url: https://dd1go.de/file.php?dir=RT73/
filter:
  - html2text:
  - re.sub:
      pattern: '(Page generated in )([0-9.])*( milliseconds.)'
      repl: '\1X\3'

@oe3jtb
Copy link
Author

oe3jtb commented Dec 28, 2020

Hi tnx for the first answer
the first one is working perfect,
the second one produces more output
the third one shows Changed but no specific content
I will watch with the first suggestion
mny tnx for your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants