Skip to content

Added Scrape builder and extended provided data#2

Merged
nightbloos merged 1 commit intomasterfrom
support-response-header
Sep 11, 2020
Merged

Added Scrape builder and extended provided data#2
nightbloos merged 1 commit intomasterfrom
support-response-header

Conversation

@nightbloos
Copy link
Copy Markdown
Owner

No description provided.

Comment thread goscraper.go Outdated
}

func (scraper *Scraper) GetDocument() (*Document, error) {
doc, err := scraper.getDocument()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it required to have this error dance in here or we can just return scraper.getDocument()?

Comment thread goscraper.go
}

func (scraper *Scraper) ParseDocument(doc *Document) (*Document, error) {
err := scraper.parseDocument(doc)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, maybe return scraper.parseDocument will be an easier way to handle it?

Comment thread goscraper.go Outdated
scrapeSettings scrapeSettings
}

func (b *scrapeBuilder) GetScraper() (*Scraper, error) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what is more common in go land - to have GetXXX from XXXBuilder or to have a generic Build, please check in other libraries

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some places find that is more used Build.

@nightbloos nightbloos force-pushed the support-response-header branch from 8a505d9 to 4f9c0d7 Compare September 11, 2020 13:51
…o 2 different functions `GetDocument` and `ParseDocument`
@nightbloos nightbloos force-pushed the support-response-header branch from 4f9c0d7 to 18337da Compare September 11, 2020 14:23
@nightbloos nightbloos merged commit 5044043 into master Sep 11, 2020
@nightbloos nightbloos deleted the support-response-header branch November 16, 2020 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants