Documentation
¶
Index ¶
- Constants
- Variables
- func CleanupMarkdown(md string) string
- func ContentChanged(oldContent, newContent string) bool
- func DetectBlocked(html string) bool
- func DetectSPA(html string) (signals []string, isSPA bool)
- func ExtractFromHTML(html string, targetURL string) (string, error)
- func FetchBytes(ctx context.Context, rawURL string, opts FetchBytesOptions) ([]byte, http.Header, int, error)
- func PreprocessHTML(html string) string
- func QuickNeedsBrowser(html string) (needsBrowser bool, reason string)
- func RenderScrapeJSON(res *ScrapeResult) ([]byte, error)
- func RenderScrapeMarkdown(res *ScrapeResult) string
- func ResultToTEIXML(r Result) ([]byte, error)
- func SemanticFingerprint(content string) string
- func WriteScrapeDirectory(res *ScrapeResult, dir string) ([]string, error)
- type BrowserDecision
- type CDNInfo
- type CacheAnalysis
- type CardItem
- type Chunk
- type ChunkConfig
- type ChunkStrategy
- type DedupeOptions
- type DedupeResult
- type DedupeStats
- type ExtractionOutcome
- type FeedItem
- type FetchBytesOptions
- type FlattenSitemapOptions
- type IndexPageResult
- type LinkRetention
- type Options
- type OutputFormat
- type PageClass
- type PageGroup
- type PageObject
- type PagePerformance
- type PageProfile
- type ParseFeedOptions
- type RankedSection
- type ResponseHeaders
- type Result
- func FromHTML(html string, targetURL string) Result
- func FromHTMLWithOptions(html string, targetURL string, opts Options) Result
- func FromResponse(resp *http.Response, targetURL string, start time.Time) Result
- func FromURL(targetURL string) Result
- func FromURLContext(ctx context.Context, targetURL string, opts Options) Result
- func FromURLWithDedupe(targetURL string) Result
- func FromURLWithOptions(targetURL string, opts Options) Result
- type SampleStrategy
- type ScrapeOptions
- type ScrapeResult
- type ScrapeSummary
- type SecurityPolicy
- type SiteInfo
- type SitemapEntry
- type SnapshotNode
- type SnapshotOptions
- type SplitConfig
- type SplitFile
- type TraceInfo
- type TransportInfo
- type Validation
Constants ¶
View Source
const ( DefaultClientTimeout = engine.DefaultClientTimeout DefaultMaxRetryWait = engine.DefaultMaxRetryWait DefaultTotalRetryTimeout = engine.DefaultTotalRetryTimeout DefaultRetryBackoffBase = engine.DefaultRetryBackoffBase DefaultSitemapMaxDepth = engine.DefaultSitemapMaxDepth DefaultSitemapMaxURLs = engine.DefaultSitemapMaxURLs DefaultFeedMaxItems = engine.DefaultFeedMaxItems )
View Source
const ( LinkRetentionAll = engine.LinkRetentionAll LinkRetentionNone = engine.LinkRetentionNone LinkRetentionText = engine.LinkRetentionText )
View Source
const ( ChunkOff = engine.ChunkOff ChunkHeading = engine.ChunkHeading ChunkSentence = engine.ChunkSentence ChunkWindow = engine.ChunkWindow )
View Source
const ( DecisionStaticHighConfidence = engine.DecisionStaticHighConfidence DecisionStaticOK = engine.DecisionStaticOK DecisionStaticCaution = engine.DecisionStaticCaution DecisionBrowserNeeded = engine.DecisionBrowserNeeded DecisionBlocked = engine.DecisionBlocked DecisionAuthRequired = engine.DecisionAuthRequired DecisionUnreachable = engine.DecisionUnreachable DecisionNotFound = engine.DecisionNotFound DecisionUnsupported = engine.DecisionUnsupported )
View Source
const ( SampleBalanced = engine.SampleBalanced SampleRandom = engine.SampleRandom SamplePriority = engine.SamplePriority )
View Source
const ( OutputJSON = engine.OutputJSON OutputMarkdown = engine.OutputMarkdown OutputDirectory = engine.OutputDirectory )
View Source
const ( DefaultScrapeMaxPages = engine.DefaultScrapeMaxPages DefaultScrapeMaxPerPattern = engine.DefaultScrapeMaxPerPattern DefaultScrapeTimeout = engine.DefaultScrapeTimeout )
Variables ¶
View Source
var ( ErrSecurityScheme = engine.ErrSecurityScheme ErrSecurityDomain = engine.ErrSecurityDomain ErrPrivateIPBlocked = engine.ErrPrivateIPBlocked ErrSecurityResolve = engine.ErrSecurityResolve ErrResponseTooLarge = engine.ErrResponseTooLarge ErrDecompressTooLarge = engine.ErrDecompressTooLarge ErrBlockedByRobots = engine.ErrBlockedByRobots ErrNeedsBrowser = engine.ErrNeedsBrowser )
View Source
var ErrMissingBaseURL = engine.ErrMissingBaseURL
Functions ¶
func CleanupMarkdown ¶
func ContentChanged ¶
func DetectBlocked ¶
func FetchBytes ¶
func PreprocessHTML ¶
func QuickNeedsBrowser ¶
func RenderScrapeJSON ¶ added in v0.2.0
func RenderScrapeJSON(res *ScrapeResult) ([]byte, error)
func RenderScrapeMarkdown ¶ added in v0.2.0
func RenderScrapeMarkdown(res *ScrapeResult) string
func ResultToTEIXML ¶
func SemanticFingerprint ¶
func WriteScrapeDirectory ¶ added in v0.2.0
func WriteScrapeDirectory(res *ScrapeResult, dir string) ([]string, error)
Types ¶
type BrowserDecision ¶
type BrowserDecision = engine.BrowserDecision
type CacheAnalysis ¶ added in v0.2.0
type CacheAnalysis = engine.CacheAnalysis
type Chunk ¶
func ChunkMarkdown ¶
func ChunkMarkdown(md string, cfg ChunkConfig) []Chunk
type ChunkConfig ¶
type ChunkConfig = engine.ChunkConfig
func ParseChunkConfig ¶
func ParseChunkConfig(s string) (ChunkConfig, error)
type ChunkStrategy ¶
type ChunkStrategy = engine.ChunkStrategy
type DedupeOptions ¶
type DedupeOptions = engine.DedupeOptions
type DedupeResult ¶
type DedupeResult = engine.DedupeResult
func Dedupe ¶
func Dedupe(content string) DedupeResult
func DedupeWithOptions ¶
func DedupeWithOptions(content string, opts DedupeOptions) DedupeResult
type DedupeStats ¶ added in v0.2.0
type DedupeStats = engine.DedupeStats
type ExtractionOutcome ¶
type ExtractionOutcome = engine.ExtractionOutcome
type FetchBytesOptions ¶
type FetchBytesOptions = engine.FetchBytesOptions
type FlattenSitemapOptions ¶
type FlattenSitemapOptions = engine.FlattenSitemapOptions
type IndexPageResult ¶
type IndexPageResult = engine.IndexPageResult
type LinkRetention ¶
type LinkRetention = engine.LinkRetention
func ParseLinkRetention ¶
func ParseLinkRetention(s string) (LinkRetention, error)
type OutputFormat ¶ added in v0.2.0
type OutputFormat = engine.OutputFormat
type PageObject ¶ added in v0.2.0
type PageObject = engine.PageObject
type PagePerformance ¶ added in v0.2.0
type PagePerformance = engine.PagePerformance
type PageProfile ¶
type PageProfile = engine.PageProfile
func ClassifyPage ¶
func ClassifyPage(result Result) PageProfile
type ParseFeedOptions ¶
type ParseFeedOptions = engine.ParseFeedOptions
type RankedSection ¶
type RankedSection = engine.RankedSection
func RankSections ¶
func RankSections(content, query string, k1, b float64, topN int) []RankedSection
type ResponseHeaders ¶ added in v0.2.0
type ResponseHeaders = engine.ResponseHeaders
type Result ¶
func FromHTMLWithOptions ¶
func FromResponse ¶
func FromURLContext ¶ added in v0.2.0
func FromURLWithDedupe ¶
func FromURLWithOptions ¶
type SampleStrategy ¶ added in v0.2.0
type SampleStrategy = engine.SampleStrategy
type ScrapeOptions ¶ added in v0.2.0
type ScrapeOptions = engine.ScrapeOptions
type ScrapeResult ¶ added in v0.2.0
type ScrapeResult = engine.ScrapeResult
func ScrapeSite ¶ added in v0.2.0
func ScrapeSite(ctx context.Context, opts *ScrapeOptions) (*ScrapeResult, error)
type ScrapeSummary ¶ added in v0.2.0
type ScrapeSummary = engine.ScrapeSummary
type SecurityPolicy ¶
type SecurityPolicy = engine.SecurityPolicy
func DefaultSecurityPolicy ¶
func DefaultSecurityPolicy() *SecurityPolicy
type SitemapEntry ¶
type SitemapEntry = engine.SitemapEntry
func FlattenSitemap ¶
func FlattenSitemap(ctx context.Context, sitemapURL string, opts FlattenSitemapOptions) ([]SitemapEntry, error)
type SnapshotNode ¶
type SnapshotNode = engine.SnapshotNode
func BuildSnapshot ¶
func BuildSnapshot(htmlStr string) (*SnapshotNode, error)
func BuildSnapshotWithOptions ¶
func BuildSnapshotWithOptions(htmlStr string, opts SnapshotOptions) (*SnapshotNode, error)
type SnapshotOptions ¶
type SnapshotOptions = engine.SnapshotOptions
type SplitConfig ¶
type SplitConfig = engine.SplitConfig
type SplitFile ¶
func SplitResultToFiles ¶
func SplitResultToFiles(r Result, cfg SplitConfig) ([]SplitFile, error)
type TransportInfo ¶ added in v0.2.0
type TransportInfo = engine.TransportInfo
type Validation ¶
type Validation = engine.Validation
func ValidateExtraction ¶
func ValidateExtraction(r *Result) Validation
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
seabench
command
|
|
|
seaportal
command
|
|
|
internal
|
|
|
tests
|
|
|
tools/commenteraser
command
Command commenteraser removes non-directive Go comments in place and gofmts the result.
|
Command commenteraser removes non-directive Go comments in place and gofmts the result. |
Click to show internal directories.
Click to hide internal directories.