OP-Engineering / link-preview-js

⛓ Extract web links information: title, description, images, videos, etc. [via OpenGraph], runs on mobiles and node.
MIT License
770 stars 124 forks source link

What url format are supported? #61

Closed long1eu closed 4 years ago

long1eu commented 4 years ago

When I use the following text: D sad da winstonscoffee.com dsds I get this error. So what king of url formats are accepted?

Error: link-preview-js did not receive a valid a url or text
    at Object.<anonymous> (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/node_modules/link-preview-js/build/index.js:259:31)
    at step (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/node_modules/link-preview-js/build/index.js:33:23)
    at Object.next (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/node_modules/link-preview-js/build/index.js:14:53)
    at /Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/node_modules/link-preview-js/build/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/node_modules/link-preview-js/build/index.js:4:12)
    at Object.getLinkPreview (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/node_modules/link-preview-js/build/index.js:246:12)
    at _linkPreview (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/dist/controllers/helpers/link_marker.js:39:14)
    at Object.linkPreview (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/dist/controllers/helpers/link_marker.js:64:16)
    at Campaigns.createCampaignObject (/Users/long1eu/IdeaProjects/yitnow/yitnow_api/grpc/dist/controllers/yitnow/campaigns.js:89:36)
ospfranco commented 4 years ago

It is stated on the readme:

https://github.com/ospfranco/link-preview-js#usage