Giter VIP home page Giter VIP logo

Comments (9)

sgbasaraner avatar sgbasaraner commented on July 27, 2024 2

AFAIK the library doesn't do the URL detection for you. You should iterate over the message, and if you come across a URL, pass that to the library.

from any_link_preview.

sgbasaraner avatar sgbasaraner commented on July 27, 2024 1

Can you show some of your code? It's confusing and bad UX to jump back and forth between SO discussions to understand the issue. I read them and now I'm unsure if the package has a bug or your implementation has one.

from any_link_preview.

mycar98765 avatar mycar98765 commented on July 27, 2024

Hi @sgbasaraner ok I will share my code

from any_link_preview.

mycar98765 avatar mycar98765 commented on July 27, 2024

My code:

AnyLinkPreview(
  link: message,
),

from any_link_preview.

mycar98765 avatar mycar98765 commented on July 27, 2024

When the message contains words that are not URLs, no results are returned.

from any_link_preview.

mycar98765 avatar mycar98765 commented on July 27, 2024

Only returns results if the message is a URL

from any_link_preview.

mycar98765 avatar mycar98765 commented on July 27, 2024

@sgbasaraner I don't quite get it. Can you share some code samples?

from any_link_preview.

sur950 avatar sur950 commented on July 27, 2024

Thanks for helping the community @sgbasaraner

My code:

AnyLinkPreview(
  link: message,
),

@mycar98765 This library expects a valid URL in your message variable. So you will need to identify the URL from your text and pass it on to the library instead of passing everything.

from any_link_preview.

sur950 avatar sur950 commented on July 27, 2024

As this is more of an implementation issue, I would suggest asking questions in Stack Overflow forums.

from any_link_preview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.