jshemas / openGraphScraper

Node.js scraper service for Open Graph Info and More!
MIT License
668 stars 105 forks source link

Solve the problem of not specifying the html option in TypeScript #187 #188

Closed gladevise closed 1 year ago

gladevise commented 1 year ago

This Pull Request (PR) is intended to resolve a bug identified in Issue #187.

Main Changes

The following updates have been made:

I could not pass all tests in my environment, probably because it depends on the location where the test is executed. I would appreciate it if you could run the test in your environment just to be sure.

The failed tests are as follows

107 passing (31s)
  6 pending
  3 failing

  1) basic
       vimeo.com should return open graph data:.

      AssertionError: expected [ { height: '720', ...(3) } ] to deeply equal [ { ...(4) }
      + expected - actual

       [
         {
           "height": "720"
      - "type": "image/jpeg"
      + "type": "image/jpeg"
           "url": "https://i.vimeocdn.com/video/659221704-68d52ff1744d1c12605d1743d3ea6b031937d002d9373e5f6111a6aef986f3e5-d"
           "width": "1280"
         }
       ]

      at /home/username/workspace/openGraphScraper/tests/integration/basic.spec.js:183:36
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  2) basic
       facebook - testing cors mode - header origin should default to url:.

      AssertionError: expected 'ja_JP' to deeply equal 'en_US'
      + expected - actual

      -ja_JP
      +en_US

      at /home/username/workspace/openGraphScraper/tests/integration/basic.spec.js:290:39
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  3) video
       Test Youtube Video - Should Return correct Open Graph Info:.
     AssertionError: expected 'ja-JP' to be one of [ 'en', 'en-US', 'nl-NL'].
      at /home/username/workspace/openGraphScraper/tests/integration/video.spec.js:21:37
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
jshemas commented 1 year ago

Hello, thanks for opening this PR! Those failing tests are unrelated your changes.