mirror of
https://github.com/gosom/google-maps-scraper.git
synced 2026-09-19 07:27:12 +08:00
Fixes parsing error (#154)
* Fixes parsing error * Updates golang to 1.24.4
This commit is contained in:
committed by
GitHub
parent
e31bffd977
commit
5c5f2a739e
@@ -16,7 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
go: ['1.24.3']
|
||||
go: ['1.24.4']
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# Build stage for Playwright dependencies
|
||||
FROM golang:1.24.3-bullseye AS playwright-deps
|
||||
FROM golang:1.24.4-bullseye AS playwright-deps
|
||||
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/browsers
|
||||
#ENV PLAYWRIGHT_DRIVER_PATH=/opt/
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
APP_NAME := google_maps_scraper
|
||||
VERSION := 1.8.0
|
||||
VERSION := 1.8.1
|
||||
|
||||
default: help
|
||||
|
||||
|
||||
+7
-3
@@ -1,3 +1,7 @@
|
||||
Rokoko Kitchen & Bar (Nicosia)
|
||||
Kitsios cafe nicosia latsia
|
||||
cafe in latsia
|
||||
cafe in athens
|
||||
restaurant in athens
|
||||
restaurant in rome
|
||||
restaurant in paris
|
||||
restaurant in madrid
|
||||
restaurant in berln
|
||||
restaurant in bari
|
||||
|
||||
+15
-4
@@ -8,9 +8,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/gosom/google-maps-scraper/exiter"
|
||||
"github.com/gosom/scrapemate"
|
||||
"github.com/playwright-community/playwright-go"
|
||||
|
||||
"github.com/gosom/google-maps-scraper/exiter"
|
||||
)
|
||||
|
||||
type PlaceJobOptions func(*PlaceJob)
|
||||
@@ -111,7 +112,6 @@ func (j *PlaceJob) BrowserActions(ctx context.Context, page playwright.Page) scr
|
||||
pageResponse, err := page.Goto(j.GetURL(), playwright.PageGotoOptions{
|
||||
WaitUntil: playwright.WaitUntilStateDomcontentloaded,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
resp.Error = err
|
||||
|
||||
@@ -220,7 +220,18 @@ func ctxWait(ctx context.Context, dur time.Duration) {
|
||||
|
||||
const js = `
|
||||
function parse() {
|
||||
const inputString = window.APP_INITIALIZATION_STATE[3][6]
|
||||
return inputString
|
||||
const appState = window.APP_INITIALIZATION_STATE[3];
|
||||
if (!appState) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (let i = 65; i <= 90; i++) {
|
||||
const key = String.fromCharCode(i) + "f";
|
||||
if (appState[key] && appState[key][6]) {
|
||||
return appState[key][6];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/gosom/google-maps-scraper
|
||||
|
||||
go 1.24.3
|
||||
go 1.24.4
|
||||
|
||||
require (
|
||||
github.com/PuerkitoBio/goquery v1.10.3
|
||||
|
||||
Reference in New Issue
Block a user