-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
Function to find the selector of a node #198
Comments
Hello, It could be done, but there can be many valid selector strings for a given node, and there's no guarantee that this selector would be unique (that is, the selector could return many matches, not just the one for that specific node). I guess it could be made unique by adding What do you want to achieve exactly? Martin |
Hello, For example, I want to crawl thousand blogs newest article urls, the html dom tree is different to varying blogs, when add a blog index url, I want store all the selector of node But I notice that
|
Thanks for the context, yeah I see what you mean, I think it makes sense. I'm gonna try to give this a shot, maybe this weekend (no promises :). I'll take a look at how Chrome handles this, but I think another option is to have an array of |
I implemented the I'll try to add the selector string thing at some point which will fit better with the rest of the goquery API. |
Thanks for the quick implement,I saw the commit, and the |
Could this function be possible?
The text was updated successfully, but these errors were encountered: