Skip to content

Commit

Permalink
Add more data to the scraper of cdmx-custom and update the version nu…
Browse files Browse the repository at this point in the history
…mber
  • Loading branch information
midir99 committed Aug 9, 2022
1 parent 335b692 commit 1f65a8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func ParseArgs() (*Args, error) {
}

func PrintVersion() {
fmt.Println("rastreadora v0.4.0")
fmt.Println("rastreadora v0.5.1")
}

func SelectScraperFuncs(alertType AlertType) (func(*doc.Doc) ([]mpp.MissingPersonPoster, map[int]error), func(uint64) string, error) {
Expand Down
16 changes: 9 additions & 7 deletions ws/cdmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,16 @@ func ScrapeCdmxCustomAlerts(d *doc.Doc) ([]mpp.MissingPersonPoster, map[int]erro
if len(ageLegend) == 2 {
age, _ = ParseCdmxAge(ageLegend[1])
}
cbsLegend := strings.TrimSpace(strings.ReplaceAll(dataTd.NthChild(6).Text(), "\u00A0", " "))
mpps = append(mpps, mpp.MissingPersonPoster{
Found: found,
MissingDate: missingDate,
MpAgeWhenDisappeared: age,
MpName: mpName,
PoPosterUrl: poPosterUrl,
PoPostUrl: poPostUrl,
PoState: mpp.StateCiudadDeMexico,
CircumstancesBehindDissapearance: cbsLegend,
Found: found,
MissingDate: missingDate,
MpAgeWhenDisappeared: age,
MpName: mpName,
PoPosterUrl: poPosterUrl,
PoPostUrl: poPostUrl,
PoState: mpp.StateCiudadDeMexico,
})
}
return mpps, errs
Expand Down

0 comments on commit 1f65a8f

Please sign in to comment.