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

Bug: Get DOM exceeds size #2

Open
BaseInfinity opened this issue May 3, 2023 · 9 comments
Open

Bug: Get DOM exceeds size #2

BaseInfinity opened this issue May 3, 2023 · 9 comments

Comments

@BaseInfinity
Copy link
Contributor

On large sites get_dom exceeds its size, maybe there's a way to use a batched version of get_dom?

@gravelBridge
Copy link
Owner

Interesting, that shouldn't be possible as I cut off the DOM at a certain size. Could you share more information like screenshots, logs, etc..? Also what websites experience this issue?

@BaseInfinity
Copy link
Contributor Author

Sure thing! Sorry I was lazy and didn't get a screenshot and quite possibly read the error wrong >.<

Ill play around with it more tomorrow and see i can get a proper stacktrace

@gravelBridge
Copy link
Owner

No problem! Ok, thank you!

@BaseInfinity
Copy link
Contributor Author

I might have been confused by this message at the bottom and so I think that's why I wrote this bug:
Screen Shot 2023-05-03 at 9 19 00 PM

I'll see if I can reproduce it reliably or maybe that error message is a red herring and it's not really a problem?

@gravelBridge
Copy link
Owner

I see, yes that is intentional. I am still trying to create a workaround, if you have any suggestions, please let me know!

@BaseInfinity
Copy link
Contributor Author

Ohhhh okay gotcha I see I thought you were using Playwright to get the DOM. Hmm would it make sense to maybe use playwright to execute JS to get the DOM?

Or would that run into the same limitation?

@gravelBridge
Copy link
Owner

It would run into the same limitation as the dom size stays the same no matter how you get it

@BaseInfinity
Copy link
Contributor Author

Hmm that's tough. I'd have to look ways of batching or streaming the DOM if that's even possible lol

I wonder if there's way to have playwright do the element lookup/find instead of having to download the DOM and search the flat DOM structure to click on what you're looking for.

Just hip-firing ideas here so take it all with a grain of salt lol

@gravelBridge
Copy link
Owner

I think there isn't a way to bypass this, it's an OpenAI issue.

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

2 participants