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

page.Elements result have cache? #993

Closed
MmToon opened this issue Dec 25, 2023 · 1 comment
Closed

page.Elements result have cache? #993

MmToon opened this issue Dec 25, 2023 · 1 comment
Labels
question Questions related to rod

Comments

@MmToon
Copy link

MmToon commented Dec 25, 2023

Rod Version: v0.114.5

The code to demonstrate your question

for elements, err := page.Elements("#box > iframe"); err == nil && !elements.Empty(); { // Always loop
	// delete element for "#box > iframe"
}

What you got

get one iframe element, but delete iframe after, still get one iframe element.
获取一个iframe元素,但在之后删除iframe,仍然获得一个iframe元素。

What you expect to see

new result
新的结果

What have you tried to solve the question

use page.Element
使用 page.Element

@MmToon MmToon added the question Questions related to rod label Dec 25, 2023
@MmToon MmToon closed this as completed Dec 25, 2023
@MmToon
Copy link
Author

MmToon commented Dec 25, 2023

是我这边的问题
for不该这么使用的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

1 participant