Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/geziyor/geziyor
/ functions
Functions
177 in github.com/geziyor/geziyor
⨍
Functions
177
◇
Types & classes
40
↓ 91 callers
Method
Set
Set stores the []byte representation of a response against a key
cache/cache.go:56
↓ 82 callers
Method
Get
Get returns the []byte representation of a cached response and a bool set to true if the value isn't empty
cache/cache.go:54
↓ 57 callers
Method
Do
Do sends an HTTP request
geziyor.go:220
↓ 54 callers
Method
Close
()
cache/cache.go:589
↓ 36 callers
Function
resetTest
()
cache/cache_test.go:169
↓ 23 callers
Function
NewGeziyor
NewGeziyor creates new Geziyor with default values. If options provided, options
geziyor.go:44
↓ 23 callers
Method
Start
Start starts scraping
geziyor.go:142
↓ 18 callers
Function
NewRequest
NewRequest returns a new Request given a method, URL, and optional body.
client/request.go:43
↓ 18 callers
Function
getFreshness
getFreshness will return one of fresh/stale/transparent based on the cache-control values of the request and the response fresh indicates the respons
cache/cache.go:338
↓ 13 callers
Method
RoundTrip
(req *http.Request)
cache/cache_test.go:1192
↓ 10 callers
Function
parseCacheControl
(headers http.Header)
cache/cache.go:528
↓ 7 callers
Method
Delete
Delete removes the value associated with the key
cache/cache.go:58
↓ 7 callers
Function
NewMemoryCacheTransport
NewMemoryCacheTransport returns a new Transport using the in-memory cache implementation
cache/cache.go:621
↓ 6 callers
Method
DoRequest
DoRequest selects appropriate request handler, client or Chrome
client/client.go:94
↓ 5 callers
Function
SetDefaultHeader
SetDefaultHeader sets header if not exists before
client/client.go:275
↓ 5 callers
Function
containsHeader
(headers []string, header string)
cache/cache_test.go:1130
↓ 5 callers
Function
getEndToEndHeaders
(respHeaders http.Header)
cache/cache.go:463
↓ 4 callers
Method
ProcessRequest
(r *client.Request)
middleware/duplicate_requests.go:16
↓ 4 callers
Function
newClientDefault
newClientDefault creates new client with default options
client/client_test.go:151
↓ 3 callers
Method
Cancel
Cancel request
client/request.go:38
↓ 3 callers
Function
ConvertMapToHeader
ConvertMapToHeader converts map[string]interface{} to http.Header
client/client.go:294
↓ 3 callers
Function
DefaultString
DefaultString returns first non-empty string
internal/strings.go:4
↓ 3 callers
Function
NewClient
NewClient creates http.Client with modified values for typical web scraper
client/client.go:60
↓ 3 callers
Method
RoundTrip
RoundTrip is a wrapper for caching requests. If there is a fresh Response already in cache, then it will be returned without connecting to the server.
cache/cache.go:126
↓ 3 callers
Function
cacheKey
cacheKey returns the cache key for req.
cache/cache.go:62
↓ 3 callers
Function
keyToFilename
(key string)
cache/diskcache/diskcache.go:41
↓ 2 callers
Function
CachedResponse
CachedResponse returns the cached http.Response for req if present, and nil otherwise.
cache/cache.go:72
↓ 2 callers
Function
ConvertHeaderToMap
ConvertHeaderToMap converts http.Header to map[string]interface{}
client/client.go:283
↓ 2 callers
Method
Cookies
Cookies returns the cookies to send in a request for the given URL.
client/client.go:263
↓ 2 callers
Function
Date
Date parses and returns the value of the Date header.
cache/cache.go:307
↓ 2 callers
Function
New
New returns a new Cache that will store files in basePath
cache/diskcache/diskcache.go:48
↓ 2 callers
Function
New
New returns a new Cache that will store items in an in-memory map
cache/memorycache/memorycache.go:36
↓ 2 callers
Function
PleaseCache
PleaseCache excercises a Cache implementation.
cache/cache.go:594
↓ 2 callers
Method
Post
Post issues a POST to the specified URL
geziyor.go:210
↓ 2 callers
Method
Read
Read reads the next len(p) bytes from R or until R is drained. The return value n is the number of bytes read. If R has no data to return, err is io.E
cache/cache.go:580
↓ 2 callers
Function
cloneRequest
cloneRequest returns a clone of the provided *http.Request. The clone is a shallow copy of the struct and its Header map. (This function copyright goa
cache/cache.go:514
↓ 2 callers
Method
do
Do sends an HTTP request
geziyor.go:233
↓ 2 callers
Function
headerAllCommaSepValues
headerAllCommaSepValues returns all comma-separated values (each with whitespace trimmed) for header name in headers. According to Section 4.2 of the
cache/cache.go:552
↓ 2 callers
Method
since
(d time.Time)
cache/cache.go:324
↓ 1 callers
Method
Client
Client returns an *http.Client that caches responses.
cache/cache.go:106
↓ 1 callers
Function
ContainsInt
ContainsInt checks whether []int contains int
internal/strings.go:30
↓ 1 callers
Function
ContainsString
ContainsString checks whether []string ContainsString string
internal/strings.go:20
↓ 1 callers
Function
DefaultRune
DefaultRune returns first non-empty rune
internal/strings.go:12
↓ 1 callers
Method
Export
(exports chan interface{})
export/export.go:6
↓ 1 callers
Method
Export
Export exports response data as CSV streaming file
export/csv.go:20
↓ 1 callers
Method
Export
Export exports response data as JSON streaming file
export/json.go:20
↓ 1 callers
Method
Export
Export exports response data as JSON
export/json.go:50
↓ 1 callers
Method
Get
Get issues a GET to the specified URL.
geziyor.go:177
↓ 1 callers
Method
GetRendered
GetRendered issues GET request using headless browser Opens up a new Chrome instance, makes request, waits for rendering HTML DOM and closed. Rendered
geziyor.go:189
↓ 1 callers
Method
Head
Head issues a HEAD to the specified URL
geziyor.go:200
↓ 1 callers
Method
IsHTML
IsHTML checks if response content is HTML by looking content-type header
client/response.go:37
↓ 1 callers
Method
JoinURL
JoinURL joins base response URL and provided relative URL. DEPRECATED: Use response.Request.URL.Parse(relativeURL) instead.
client/response.go:26
↓ 1 callers
Function
New
New returns a new Cache that will store leveldb in path
cache/leveldbcache/leveldbcache.go:35
↓ 1 callers
Function
NewDelay
(requestDelayRandomize bool, requestDelay time.Duration)
middleware/delay.go:15
↓ 1 callers
Function
NewMetrics
NewMetrics creates new metrics with given metrics.Type
metrics/metrics.go:38
↓ 1 callers
Function
NewRedirectionHandler
NewRedirectionHandler returns maximum allowed redirection function with provided maxRedirect
client/client.go:303
↓ 1 callers
Function
NewRobotsTxt
(client *client.Client, metrics *metrics.Metrics, robotsDisabled bool)
middleware/robotstxt.go:21
↓ 1 callers
Function
NewTransport
NewTransport returns a new Transport with the provided Cache implementation and MarkCachedResponses set to true
cache/cache.go:97
↓ 1 callers
Method
ProcessRequest
(r *client.Request)
middleware/middleware.go:16
↓ 1 callers
Method
ProcessResponse
(r *client.Response)
middleware/middleware.go:21
↓ 1 callers
Function
RoundRobinProxy
RoundRobinProxy creates a proxy switcher function which rotates ProxyURLs on every request. The proxy type is determined by the URL scheme. "http", "h
client/proxy.go:34
↓ 1 callers
Method
RoundTripDummy
RoundTripDummy has no awareness of any HTTP Cache-Control directives. Every request and its corresponding response are cached. When the same request i
cache/cache.go:136
↓ 1 callers
Method
RoundTripRFC2616
RoundTripRFC2616 provides a RFC2616 compliant HTTP cache, i.e. with HTTP Cache-Control awareness, aimed at production and used in continuous runs to a
cache/cache.go:182
↓ 1 callers
Function
StartMetricsServer
StartMetricsServer starts server that handles metrics Prometheus: http://localhost:2112/metrics Expvar : http://localhost:2112/debug/vars
metrics/metrics.go:99
↓ 1 callers
Method
acquireSem
(req *client.Request)
geziyor.go:270
↓ 1 callers
Function
canStaleOnError
Returns true if either the request or the response includes the stale-if-error cache control extension: https://tools.ietf.org/html/rfc5861
cache/cache.go:421
↓ 1 callers
Function
canStore
(reqCacheControl, respCacheControl cacheControl)
cache/cache.go:491
↓ 1 callers
Method
doRequestChrome
doRequestChrome opens up a new chrome instance and makes request
client/client.go:171
↓ 1 callers
Method
doRequestClient
doRequestClient is a simple wrapper to read response according to options.
client/client.go:124
↓ 1 callers
Method
interruptSignalWaiter
interruptSignalWaiter waits data from provided channels and stops scraper if shutdownChan channel receives SIGINT
geziyor.go:313
↓ 1 callers
Function
jsonMarshalLine
jsonMarshalLine adds tab and comma around actual data
export/json.go:86
↓ 1 callers
Function
newGatewayTimeoutResponse
(req *http.Request)
cache/cache.go:501
↓ 1 callers
Method
recoverMe
recoverMe prevents scraping being crashed. Logs error and stack trace
geziyor.go:305
↓ 1 callers
Method
releaseSem
(req *client.Request)
geziyor.go:291
↓ 1 callers
Function
setup
()
cache/cache_test.go:41
↓ 1 callers
Method
startExporters
()
geziyor.go:326
↓ 1 callers
Function
teardown
()
cache/cache_test.go:164
↓ 1 callers
Function
varyMatches
varyMatches will return false unless all of the cached values for the headers listed in Vary match the new request
cache/cache.go:112
Function
BenchmarkRequests
Make sure to increase open file descriptor limits before running
geziyor_test.go:381
Function
BenchmarkWhole
(b *testing.B)
geziyor_test.go:413
Method
Delete
Delete removes the response with key from the cache
cache/leveldbcache/leveldbcache.go:30
Method
Delete
Delete removes the response with key from the cache
cache/diskcache/diskcache.go:36
Method
Delete
Delete removes key from the cache
cache/memorycache/memorycache.go:29
Method
Export
Export logs exported data to console as pretty printed
export/pprint.go:12
Method
Get
Get returns the response corresponding to key if present
cache/leveldbcache/leveldbcache.go:15
Method
Get
Get returns the response corresponding to key if present
cache/diskcache/diskcache.go:20
Method
Get
Get returns the []byte representation of the response and true if present, false if not
cache/memorycache/memorycache.go:14
Method
GetProxy
(pr *http.Request)
client/proxy.go:19
Function
NewWithDB
NewWithDB returns a new Cache using the provided leveldb as underlying storage.
cache/leveldbcache/leveldbcache.go:49
Function
NewWithDiskv
NewWithDiskv returns a new Cache using the provided Diskv as underlying storage.
cache/diskcache/diskcache.go:59
Method
ProcessRequest
(r *client.Request)
middleware/robotstxt.go:30
Method
ProcessRequest
(r *client.Request)
middleware/headers.go:12
Method
ProcessRequest
(r *client.Request)
middleware/allowed_domains.go:15
Method
ProcessRequest
(r *client.Request)
middleware/metrics.go:14
Method
ProcessRequest
(r *client.Request)
middleware/delay.go:22
Method
ProcessResponse
(r *client.Response)
middleware/log_stats.go:13
Method
ProcessResponse
(r *client.Response)
middleware/metrics.go:18
Method
ProcessResponse
(r *client.Response)
middleware/parse_html.go:15
Method
Set
Set saves a response to the cache as key
cache/leveldbcache/leveldbcache.go:25
Method
Set
Set saves a response to the cache as key
cache/diskcache/diskcache.go:30
next →
1–100 of 177, ranked by callers