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

algolia search box troubles? #895

Closed
lukasmrtvy opened this issue Jan 3, 2023 · 3 comments · Fixed by #899
Closed

algolia search box troubles? #895

lukasmrtvy opened this issue Jan 3, 2023 · 3 comments · Fixed by #899

Comments

@lukasmrtvy
Copy link

Hello,
Can We do something with results from pages containing algolia search box ? Thanks

➜  /tmp ./lychee https://www.algolia.com/search/
⠐ 31/31 [00:00:10] █████████████████████████ ✗ [400] https://res.cloudinary.com/hilnmyskv/image/upload/v1580296397/Algolia_com_Website_assets/logo-algolia-xenon-blue-full.png&quot | FailedIssues found in 1 input. Find details below.

[https://www.algolia.com/search/]:
✗ [404] https://1qdawl72tq-dsn.algolia.net/ | Failed: Network error: Not Found
✗ [400] https://cdn.cookielaw.org/ | Failed: Network error: Bad Request
✗ [404] https://www.facebook.com/algolia/&quot | Failed: Network error: Not Found
✗ [404] https://www.instagram.com/algoliahq/&quot | Failed: Network error: Not Found
✗ [400] https://res.cloudinary.com/hilnmyskv/image/upload/v1580296397/Algolia_com_Website_assets/logo-algolia-xenon-blue-full.png&quot | Failed: Network error: Bad Request
✗ [404] https://cdn.segment.com/analytics.js/v1/ | Failed: Network error: Not Found
✗ [404] https://www.algolia.com/contact/enterprise/&quot | Failed: Network error: Not Found
✗ [404] https://www.algolia.com/demorequest/&quot | Failed: Network error: Not Found
✗ [404] https://www.github.com/Algolia/&quot | Failed: Network error: Not Found
✗ [404] https://res.cloudinary.com/ | Failed: Network error: Not Found
✗ [404] https://www.algolia.com/for-open-source/&quot | Failed: Network error: Not Found
✗ [404] https://www.twitter.com/Algolia/&quot | Failed: Network error: Not Found
✗ [400] https://res.cloudinary.com/hilnmyskv/image/upload/v1527077656/Algolia_OG_image_m3xgjb.png&quot | Failed: Network error: Bad Request
✗ [404] https://www.algolia.com/&quot | Failed: Network error: Not Found

🔍 31 Total ✅ 16 OK 🚫 14 Errors (HTTP:14) 💤 1 Excluded

lychee v0.10.3

@lukasmrtvy lukasmrtvy changed the title algolia search troubles? algolia search box troubles? Jan 3, 2023
@mre
Copy link
Member

mre commented Jan 3, 2023

The URLs in question are encoded in a script tag along with some other data:

<script type="application/ld+json">
[
  {
    &quot;@context&quot;: &quot;http://schema.org&quot;,
    &quot;@type&quot;: &quot;Organization&quot;,
    &quot;name&quot;: &quot;Algolia&quot;,
    &quot;url&quot;: &quot;https://www.algolia.com/&quot;,
    &quot;logo&quot;: &quot;https://res.cloudinary.com/hilnmyskv/image/upload/v1580296397/Algolia_com_Website_assets/logo-algolia-xenon-blue-full.png&quot;,
    &quot;image&quot;: &quot;https://res.cloudinary.com/hilnmyskv/image/upload/v1527077656/Algolia_OG_image_m3xgjb.png&quot;,
    &quot;description&quot;: &quot;Fast, reliable and modern Search &amp; Discovery&quot;,
    &quot;address&quot;: {
      &quot;@type&quot;: &quot;PostalAddress&quot;,
      &quot;streetAddress&quot;: &quot;301 Howard St, 3rd floor&quot;,
      &quot;addressLocality&quot;: &quot;San Francisco&quot;,
      &quot;addressRegion&quot;: &quot;California&quot;,
      &quot;postalCode&quot;: &quot;94105&quot;,
      &quot;addressCountry&quot;: &quot;USA&quot;
    },
    &quot;sameAs&quot;: [
      &quot;https://www.linkedin.com/company/algolia/&quot;,
      &quot;https://www.facebook.com/algolia/&quot;,
      &quot;https://www.github.com/Algolia/&quot;,
      &quot;https://www.youtube.com/user/Algolia/&quot;,
      &quot;https://www.twitter.com/Algolia/&quot;,
      &quot;https://www.instagram.com/algoliahq/&quot;
    ],
   ...
</script>

I thought that's fixed in master by #848, which excludes <script> tags by default. Seems like it doesn't cover your case.
Just tested it and when I put the raw HTML into a file it works as expected. Only when I use the URL which serves that content it doesn't work. Not sure why yet.

@mre
Copy link
Member

mre commented Jan 3, 2023

My check for remote URLs was incorrect. I guess I fixed it in #899 and added some more tests to avoid future breakage.
@lukasmrtvy fyi

@mre mre closed this as completed in #899 Jan 3, 2023
@mre
Copy link
Member

mre commented Jan 3, 2023

This is fixed in master and will be released with the next version. Thanks for the report @lukasmrtvy.

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

Successfully merging a pull request may close this issue.

2 participants