PactInteractive / image-downloader

Download images from the web more easily. A browser extension for Google Chrome, Microsoft Edge, and Brave.
https://chrome.google.com/webstore/detail/image-downloader/cnpniohnfphhjihaiiggeabnkjhpaldj
804 stars 296 forks source link

Filter two URLS! #7

Closed haleyngonadi closed 9 years ago

haleyngonadi commented 9 years ago

Hi. This is a fantastic extension. I'm trying to develop it further for a particular website and I'm wondering if it is possible to have two filter URLs as opposed to one, which it currently has!

Thank you!

vdsabev commented 9 years ago

Can you give an example of using "two filter URLs"? Did you perhaps mean showing images from either website A or website B? That can be easily achieved by using a regular expression filter. For example try going to http://www.reddit.com and using (www.redditstatic.com)|(i.imgur.com) as a RegEx filter.

haleyngonadi commented 9 years ago

That makes a lot sense but I'm not sure how to go about it. Where do I add the RegEx?!

Main site: http://beyonce.com Filter 1: http://static.parkwoodent.netdna-cdn.com Filter 2: http://beyonce.com/wp-content/uploads

vdsabev commented 9 years ago

Just use http://static.parkwoodent.netdna-cdn.com|http://beyonce.com/wp-content/uploads as the filter, and switch the filter type from Normal to Regex using the dropdown to the right of the filter text box. I'm seeing 35 images on the website you provided.

haleyngonadi commented 9 years ago

That worked, perfectly. You're a star! Can I ask if there is a way to remove something from the URLs?!

For example. It fetches:

  1. http://www.beyonce.com/wp-content/uploads/2015/04/MyLife-HI_13-600x600.jpg

I would like to get rid of -600x600 so

  1. http://www.beyonce.com/wp-content/uploads/2015/04/MyLife-HI_13.jpg

Makes sense?!

vdsabev commented 9 years ago

I would suggest either filtering by minimum width / height, or just manually deselecting the images you don't want. Regular expressions are notoriously hard to write and are meant to be used sparsely, mostly in cases where you want to filter out hundreds of images.