Implemented the integration with scraper python server, tenders summarise, and some fixes.
This commit is contained in:
+3
-13
@@ -71,23 +71,16 @@ type Client struct {
|
||||
httpClient *http.Client
|
||||
baseURL string
|
||||
logger logger.Logger
|
||||
// Stored credentials
|
||||
username string
|
||||
password string
|
||||
loginURL string
|
||||
}
|
||||
|
||||
// NewClient creates a new scraper SDK client with stored credentials
|
||||
func NewClient(baseURL string, timeout time.Duration, logger logger.Logger, username, password, loginURL string) SDK {
|
||||
func NewClient(baseURL string, timeout time.Duration, logger logger.Logger) SDK {
|
||||
return &Client{
|
||||
httpClient: &http.Client{
|
||||
Timeout: timeout,
|
||||
},
|
||||
baseURL: baseURL,
|
||||
logger: logger,
|
||||
username: username,
|
||||
password: password,
|
||||
loginURL: loginURL,
|
||||
baseURL: baseURL,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,9 +94,6 @@ func (c *Client) ScrapeDocuments(ctx context.Context, req *ScrapeRequest) (*Scra
|
||||
// Prepare request body with stored credentials + dynamic fields
|
||||
requestBody := map[string]interface{}{
|
||||
"notice_id": req.NoticeID,
|
||||
"username": c.username,
|
||||
"password": c.password,
|
||||
"login_url": c.loginURL,
|
||||
"notice_url": req.NoticeURL,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user