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

url.Parse before send to channel #37

Open
theblackturtle opened this issue Oct 19, 2019 · 1 comment
Open

url.Parse before send to channel #37

theblackturtle opened this issue Oct 19, 2019 · 1 comment

Comments

@theblackturtle
Copy link

Hi, I think you should add url.Parse for url parse from html before send it to channel because something like this can happen.

GOOD: GET Found https://xxx.io/www.xxx.com --><!-- Last Published: Wed Sep 25 2019 00:19:19 GMT+0000 (UTC) --><html data-wf-domain="xxx.io" data-wf-page="5c6f4e9e89c36802e87289f8" data-wf-site="5c6eefaaeddf9248ac13bc72"><head><meta charset="utf-8"/phpmyadmin2017%2F [301 Moved Permanently] Length: 182 http://xxx.io/www.xxx.com%20--><!--%20Last%20Published:%20Wed%20Sep%2025%202019%2000:19:19%20GMT+0000%20(UTC)%20--><html%20data-wf-domain="xxx.io"%20data-wf-page="5c6f4e9e89c36802e87289f8"%20data-wf-site="5c6eefaaeddf9248ac13bc72"><head><meta%20charset="utf-8"/phpmyadmin2017
@C-Sto
Copy link
Owner

C-Sto commented Oct 22, 2019

This looks like it's probably more of a bug in the spider function which I've never really been super happy with (

func GetURLs(page []byte) ([]string, error) {
). Adding an url.Parse will just hide that buggy code rather than resolving it (but there should definitely be an url.Parse as well)

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