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

Crawl https sitemap with http urls #639

Open
SaschaHeyer opened this issue Sep 9, 2019 · 5 comments
Open

Crawl https sitemap with http urls #639

SaschaHeyer opened this issue Sep 9, 2019 · 5 comments

Comments

@SaschaHeyer
Copy link

Hi Pascal,

how can I crawl a sitemap with is reachable with https but contains urls with http. Norconex is not identifying any startURLs in that case.

I tried already setting lenient to true

<sitemapResolverFactory ignore="false" lenient="true" class="com.norconex.collector.http.sitemap.impl.StandardSitemapResolverFactory">
      <path></path>
</sitemapResolverFactory>

As well as stayOnProtocol to false

<startURLs stayOnDomain="true" stayOnPort="true" stayOnProtocol="false">
        #parse("./shared/startUrls-sitemap.xml")
</startURLs>

Any other recommendations?

Best regards
Sascha

@essiembre
Copy link
Contributor

I would try stayOnPort="false" given https is on 443.

@SaschaHeyer
Copy link
Author

No difference with stayOnPort="false"

@essiembre
Copy link
Contributor

Have you tried using GenericURLNormalizer and convert the said URLs to https with the secureScheme normalization?

@jetnet
Copy link

jetnet commented Jun 2, 2020

same issue here.
secureScheme helps with such sites, but unfortunately it cannot be used globally, as we have to crawl many unsecured sites too.
Any suggestions? Thanks!

@essiembre
Copy link
Contributor

That is a tough one because any URLs, even within the same site, might be supporting different schemes: http, https, or both.

We could investigate a new feature that always tries the "preferred" scheme first, and if failing, falling back to the other. But for some sites, it could pretty much double the number of "hits" on the server.

My preference would be to encourage identifying those sites instead and handle them separately, in their own crawler config let's say. It may not always be the most realistic, but preferable when possible.

If you have better options, I would like to hear them.

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

No branches or pull requests

3 participants