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

Fail to parse Google Analytics tracking URL #230

Closed
seisman opened this issue Apr 18, 2021 · 6 comments
Closed

Fail to parse Google Analytics tracking URL #230

seisman opened this issue Apr 18, 2021 · 6 comments

Comments

@seisman
Copy link

seisman commented Apr 18, 2021

Our site (https://www.pygmt.org/dev/) uses Google Analytics tracking codes like:


<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]\|\|function(){
  (i[r].q=i[r].q\|\|[]).push(arguments)},i[r].l=1*new
  Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-38125837-7', 'auto', {'storage': 'none'});
  ga('set', 'anonymizeIp', true);
  ga('send', 'pageview');
  </script>

Running lychee gives the following error:

lychee https://www.pygmt.org/dev

✗ https://www.google-analytics.com/analytics.js','ga (HTTP status client error (404 Not Found) for url (https://www.google-analytics.com/analytics.js','ga))
@mre
Copy link
Member

mre commented Apr 19, 2021

That's an upstream problem in linkify.
See robinst/linkify#20

@mre
Copy link
Member

mre commented Apr 26, 2021

PR over at robinst/linkify#21

@mre
Copy link
Member

mre commented May 18, 2021

Upstream PR is merged now. 🎉

@mre
Copy link
Member

mre commented May 19, 2021

This should be fixed on lychee master now.

@mre
Copy link
Member

mre commented May 19, 2021

Given your input, I get the following output with lychee:

❯❯❯ lychee test.md --verbose 
✔ https://www.google-analytics.com/analytics.js [200 OK]

📝 Summary
---------------------
🔍 Total............1
✅ Successful.......1
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........0
🚫 Errors...........0

Will cut a new version soon.

@mre
Copy link
Member

mre commented Sep 4, 2021

A new version is out now. Closing this.

@mre mre closed this as completed Sep 4, 2021
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