Closed Nelyah closed 4 years ago
Ok, I feel bad...completely forgot about checking this PR!! Let me test it and I'll get back to you hopefully within a few days. Really sorry about that...I don't like ignoring contributions :(
After a quick look, what do you think about attempting to generalize this PR to allow custom regex's as we have discussed in #79?
Use case
I use
urlscan
when I need to click something from my CLI mail client (alot
). Most of the html mails I receive however are crowded with images (gif, png and jpg mainly) which all make it more difficult to find the link I actually need to click. I rarely (if ever) need to open an image link.Solution proposed
Add an option to block out image URLs.
Implementation
I declared a second regex to find URLs ending in
(.gif|.png|.jpg)
and added an option to use this URL (URLRE_NOIMAGE
) instead of the default one (URLRE
). I have also added the "poor man's tests" to myURLRE_NOIMAGE
.I have tested it locally and this seems to work on my end. Any comment would be appreciated!