Comments (5)
@asciimoo use release version to keep it in old version, master branch only for development and release version for stable in different stage, like go-redis/redis does, but this will take you more time
from colly.
@cctse I agree, but it would require API change to be effective, because glob expressions have to be compiled and we have to track manually when the AllowedDomains
list changes. Perhaps we could add a SetAllowedDomainsGlobs(domainGlobs string...) error
function to the Collector for this purpose.
from colly.
@cctse as an alternative solution you can use Collector.URLFilters
:
c.URLFilters = []*regexp.Regexp{
regexp.MustCompile(`^https?://[a-z]+\.httpbin\.org/`)
}
Full example: http://go-colly.org/docs/examples/url_filter/
I think this functionality covers your needs and maybe adding domain globs too would be redundant. What do you think?
from colly.
@asciimoo thanks, this can works well, I'm using glob check before visit a link in onResponse. I'm still thinking add a function like SetAllowedDomainsGlobs may be better
from colly.
It would require less boilerplate than URLFilters
but the feature it provides is only a subset of URLFilters
's functionality. I think it is more important to keep the API clean and small than optimizing for edge cases by adding new functions without new functionality. Feel free to reopen if you still disagree.
from colly.
Related Issues (20)
- Colly has vulnerabilities with medium criticality HOT 4
- Fetching data that is not coming in curl output HOT 1
- SIGSEG on local files HOT 1
- Misleading Request.Depth documentation HOT 1
- I have a request that I don't know how to make using Colly. HOT 1
- Different MaxDepth on AllowedDomains and others ? HOT 3
- Is there a way spider for "https://netbanking.hdfcbank.com/netbanking" with my owner account? HOT 1
- HTML encoding is not autodetected properly HOT 6
- request chan error HOT 1
- Cannot send request with no Accept header HOT 1
- handleOnXML tries to parse`.xlsx` files HOT 2
- Next release - When?
- Duplicated requests HOT 1
- How to handle selector not found?
- how to by pass c.OnError HOT 1
- Post Login not persist session
- Weird async behaviour - duplicates in responses HOT 1
- Support BFS search .
- retry redirect to AlreadyVisitedUrl will loop error HOT 1
- Error trying to conditionally set up proxy function HOT 1
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 colly.