Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderd js not working #60

Open
SimeonNew opened this issue Jan 17, 2023 · 2 comments
Open

renderd js not working #60

SimeonNew opened this issue Jan 17, 2023 · 2 comments

Comments

@SimeonNew
Copy link

even though I copied the text from the documentation without any changes I still get a runtime error

here is my code ( main.go func calls just calls it)

import (
	"fmt"

	"github.com/geziyor/geziyor"
	"github.com/geziyor/geziyor/client"
)

func FindMenu() {
	geziyor.NewGeziyor(&geziyor.Options{
		StartRequestsFunc: func(g *geziyor.Geziyor) {
			g.GetRendered("https://www.google.com", g.Opt.ParseFunc)
		},
		ParseFunc: func(g *geziyor.Geziyor, r *client.Response) {
			fmt.Println(string(r.Body))
		},
		//BrowserEndpoint: "ws://localhost:3000",
	}).Start()

}

and here is the error:

Scraping Started
assignment to entry in nil map goroutine 22 [running]:
runtime/debug.Stack()
        C:/Program Files/Go/src/runtime/debug/stack.go:24 +0x65
github.com/geziyor/geziyor.(*Geziyor).recoverMe(0xc0000e74a0)
        C:/Users/simeo/go/pkg/mod/github.com/geziyor/geziyor@v0.0.0-20221223163247-7349b81754b8/geziyor.go:307 +0x45
panic({0x134cd40, 0x1552d50})
        C:/Program Files/Go/src/runtime/panic.go:884 +0x212
net/textproto.MIMEHeader.Set(...)
        C:/Program Files/Go/src/net/textproto/header.go:22
net/http.Header.Set(...)
        C:/Program Files/Go/src/net/http/header.go:40
github.com/geziyor/geziyor/client.ConvertMapToHeader(0xc00022a680?)
        C:/Users/simeo/go/pkg/mod/github.com/geziyor/geziyor@v0.0.0-20221223163247-7349b81754b8/client/client.go:297 +0x125
github.com/geziyor/geziyor/client.(*Client).doRequestChrome(0xc0003777d0, 0xc0000ac5f0)
        C:/Users/simeo/go/pkg/mod/github.com/geziyor/geziyor@v0.0.0-20221223163247-7349b81754b8/client/client.go:237 +0x6ca
github.com/geziyor/geziyor/client.(*Client).DoRequest(0xc0003777d0, 0xc0000ac5f0)
        C:/Users/simeo/go/pkg/mod/github.com/geziyor/geziyor@v0.0.0-20221223163247-7349b81754b8/client/client.go:96 +0x33
github.com/geziyor/geziyor.(*Geziyor).do(0xc0000e74a0, 0xc0000ac5f0, 0x1488ad0)
        C:/Users/simeo/go/pkg/mod/github.com/geziyor/geziyor@v0.0.0-20221223163247-7349b81754b8/geziyor.go:246 +0x12e
created by github.com/geziyor/geziyor.(*Geziyor).Do
        C:/Users/simeo/go/pkg/mod/github.com/geziyor/geziyor@v0.0.0-20221223163247-7349b81754b8/geziyor.go:228 +0xd2

Scraping Finished

I'm sorry if the error is on my side

@10k0n
Copy link

10k0n commented Jan 18, 2023

Same here

@INDIW33D
Copy link

same

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

No branches or pull requests

3 participants