urlwatch icon indicating copy to clipboard operation
urlwatch copied to clipboard

How can you adjust the number of output lines?

Open n8sask opened this issue 8 years ago • 3 comments

When a change is detected how can we adjust the number of lines sent to the email / notification service? For me it isn't parsing the right data. I need more lines Morty!!

=========================

  1. CHANGED: MyWebsite
    =========================

CHANGED: MyWebsite (https://someurl.com/)

--- @ Fri, 26 Jan 2018 13:47:05 -0600
+++ @ Sat, 27 Jan 2018 09:37:06 -0600
@@ -7,7 +7,7 @@
Ships within 7 business days
22 USD
Information

  •                                        Sold Out
    
  •                                                                                                    Add To Cart
                                                                      Product
                                                                      Shipping $9.99
                                       22 USD
    

n8sask avatar Jan 27 '18 15:01 n8sask

You can do this by changing (currently only in the code unfortunately) the following parameter "n":

https://docs.python.org/3/library/difflib.html#difflib.unified_diff

The call to change is here:

https://github.com/thp/urlwatch/blob/d085a64bb7945c8fefbba41c843c4942e2763e2a/lib/urlwatch/reporters.py#L103

thp avatar Jan 28 '18 19:01 thp

Thanks for the reply!

Could this be a future feature request? The ability to change how many lines to return.

n8sask avatar Jan 28 '18 19:01 n8sask

Feel free to create a pull request if you want to have this configurable.

thp avatar Jul 10 '20 13:07 thp