https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • c

    Crazy Rabbit

    02/15/2023, 2:50 PM
    yeah tech people mostly wouldn't do that. But if I change the search engine to the companies that I manage.
  • c

    Crazy Rabbit

    02/15/2023, 2:50 PM
    Most of support there is non-technical.
  • c

    Crazy Rabbit

    02/15/2023, 2:50 PM
    And they most of the time even search for youtube
  • c

    Crazy Rabbit

    02/15/2023, 2:51 PM
    and by just caching query youtube it would decrease my expenses by a lot.
  • d

    Dani Foldi

    02/15/2023, 2:51 PM
    I don't understand why you need a custom search engine to find youtube
  • c

    Crazy Rabbit

    02/15/2023, 2:52 PM
    ask this to non-tech people. They don't enter domains in search bar
  • c

    Crazy Rabbit

    02/15/2023, 2:52 PM
    they always just open google and type youtube there
  • d

    Dani Foldi

    02/15/2023, 2:53 PM
    neither do I, I use 150+ of duckduckgo's !bangs every week, and yes I counted them once
  • h

    HardAtWork

    02/15/2023, 2:53 PM
    But what incentive do non-tech people have to not just use Google?
  • d

    Dani Foldi

    02/15/2023, 2:53 PM
    also at what point do we declare this conversation #812577823599755274
  • h

    HardAtWork

    02/15/2023, 2:54 PM
    https://tenor.com/view/do-it-get-to-work-gif-21630516
  • c

    Crazy Rabbit

    02/15/2023, 2:54 PM
    They just use what is provided to them by default.
  • c

    Crazy Rabbit

    02/15/2023, 2:54 PM
    that's why windows is the most popular OS.
  • c

    Crazy Rabbit

    02/15/2023, 2:54 PM
    because it's installed by default
  • c

    Crazy Rabbit

    02/15/2023, 2:54 PM
    on almost every computer you buy
  • d

    dave

    02/15/2023, 3:23 PM
    Is there really no way to get the delivery status of an email sent through mailchannels?
  • d

    dave

    02/15/2023, 3:23 PM
    https://api.mailchannels.net/tx/v1/documentation
  • v

    Vonarian

    02/15/2023, 6:04 PM
    Hiya I want to fetch a webpage's HTML content, get some content from the HTML text, then write a response in JSON on the workers webpage (Like an API). How can I do that? It seems like we can't use Node modules, so I was looking for a way to use something like
    jsdom
    to get specific data from the HTML content. How can I achieve this? 🙂 Thanks.
  • c

    Crazy Rabbit

    02/15/2023, 6:11 PM
    Did you tried using import.
  • c

    Crazy Rabbit

    02/15/2023, 6:11 PM
    Copy code
    js
    import {JSDOM} from "jsdom"
    
    const dom = new JSDOM("<div>some HTML</div>")
    const doc = dom.window.document
  • c

    Crazy Rabbit

    02/15/2023, 6:11 PM
    Could be compatible.
  • v

    Vonarian

    02/15/2023, 6:12 PM
    Copy code
    X [ERROR] Could not resolve "perf_hooks"
    
        node_modules/jsdom/lib/jsdom/utils.js:5:26:
          5 │ const perfHooks = require("perf_hooks");
            ╵                           ~~~~~~~~~~~~
    
      The package "perf_hooks" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
    
    
    X [ERROR] Build failed with 1 error:
    
      node_modules/jsdom/lib/jsdom/utils.js:5:26: ERROR: Could not resolve "perf_hooks"
  • v

    Vonarian

    02/15/2023, 6:12 PM
    Now it's better, I was using
    require('jsdom')
    and it was throwing from the start
  • v

    Vonarian

    02/15/2023, 6:15 PM
    The errors were a lot before adding
    node_compat = true
    to wrangler config
  • c

    Crazy Rabbit

    02/15/2023, 6:15 PM
    It's not ES6 compatible.
  • c

    Crazy Rabbit

    02/15/2023, 6:17 PM
    I also don't think you should be using node_compat. I'm not sure but wouldn't this be removed or it isn't suggested to use...
  • c

    Crazy Rabbit

    02/15/2023, 6:18 PM
    Would be better way to find a library that support import
  • v

    Vonarian

    02/15/2023, 6:18 PM
    Mhm... thank you. What's your suggestion to reach my goal?
  • v

    Vonarian

    02/15/2023, 6:19 PM
    Alrighty thanks.
  • c

    Crazy Rabbit

    02/15/2023, 6:20 PM
    https://github.com/WebReflection/linkedom#readme
1...227522762277...2509Latest