Skip to content

Commit

Permalink
Fix remote scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikidepia committed Jul 15, 2024
1 parent 3f10ea2 commit b6f7690
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/scraper/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (i *InstaData) ScrapeData() error {
req.Header.Set("Accept-Encoding", "gzip, deflate, br")
if res, err := client.Do(req); err == nil {
defer res.Body.Close()
iDataGunzip, err := io.ReadAll(req.Body)
iDataGunzip, err := io.ReadAll(res.Body)
if err == nil {
if err = binary.Unmarshal(iDataGunzip, i); err == nil {
log.Info().Str("postID", i.PostID).Msg("Data parsed from remote scraper")
Expand Down

0 comments on commit b6f7690

Please sign in to comment.