Comments (3)
I think that is the correct result.
If you read this #23 lupomontero explains more.
What I do to check if the domain is valid, meaning has a valid TLD (and this might not be completely correct, but is working for me so far) is to just check if it is listed.
In your example that would be...
psl.parse(someURL).listed // true if valid TLD and false otherwise.
from psl.
Can anyone explain what the rule for s3.amazonaws.com
is for? I'm not grasping the rationale.
https://github.com/lupomontero/psl/blob/master/data/rules.json#L7381
In our use case we have a url like https://s3.amazonaws.com/somebucket.com/index.html
and we strip everything but the hostname, s3.amazonaws.com
to check if it's valid. Using psl.isValid(someURL)
works for this use case for every other type of URL, but it can't recognize s3.amazonaws.com
as valid due to that rule.
from psl.
Thanks for sharing that @z639! I think that will work for us too.
I tried for a while to find a related issue but since I was only searching for s3.amazonaws
that didn't come up.
Thanks again!
from psl.
Related Issues (20)
- cloudfront.net tld? HOT 1
- Use with Google apps script engine
- Interest in isCookieDomainAcceptable()
- Use of the term 'master' and 'slave' HOT 2
- Is there a similar project for PHP? HOT 1
- platform.sh should be a valid domain HOT 1
- Not returning proper domain HOT 1
- Option to parse even when invalid HOT 1
- AWS endpoints in data differ from AWS documentation HOT 1
- Dependency on deprecated Node "punycode" module HOT 9
- Performance issues - iterating over 9k rules for every domain HOT 3
- Getting domain "null" for localhost
- it.com HOT 1
- domain is not parsed correctly for `run.app` HOT 3
- Broken unicode in `rules.json` (easy fix)
- with pornographic content HOT 1
- punycode is deprecated in Node v21 HOT 6
- Domain ending with a period shouldn't be valid HOT 1
- Unmaintained Package HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psl.