burnex
V2EX  ›  问与答

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

  •  
  •   burnex · Feb 28, 2020 · 2014 views
    This topic created in 2276 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   ·   844 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 21:34 · PVG 05:34 · LAX 14:34 · JFK 17:34
    ♥ Do have faith in what you're doing.