V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
burnex
V2EX  ›  问与答

类似 Notion 的 create bookmark 实现思路求教

  •  
  •   burnex · Feb 28, 2020 · 1958 views
    This topic created in 2256 days ago, the information mentioned may be changed or developed.

    类似在 notion 中粘贴一个链接,选择 create bookmark,会解析出网页的内容,生成一个包含标题、描述和图片的卡片,

    请问: 1、由于 js 跨域的问题,是不是只能在服务端去获取这个链接(别的网站)的内容,然后回传给客户端? 2、如果是服务端去请求这些链接,那么请求多了,服务器 ip 会不会被别的网站屏蔽? 3、有没有可能在客户端用 js 获取? 4、或者有没有别的好的实现方式?

    谢谢!

    2 replies    2020-02-29 16:59:08 +08:00
    dreasky
        1
    dreasky  
       Feb 28, 2020
    跨域限制是浏览器的问题
    burnex
        2
    burnex  
    OP
       Feb 29, 2020
    修改下格式:

    1. 由于 js 跨域的问题,是不是只能在服务端去获取这个链接(别的网站)的内容,然后回传给客户端?
    2. 如果是服务端去请求这些链接,那么请求多了,服务器 ip 会不会被别的网站屏蔽?
    3. 有没有可能在客户端用 js 获取?
    4. 或者有没有别的好的实现方式?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   788 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 20:26 · PVG 04:26 · LAX 13:26 · JFK 16:26
    ♥ Do have faith in what you're doing.