thulioph / whosampled-scraper

Fetch sample information from WhoSampled webpage.
https://whosampled-scraper.herokuapp.com/
25 stars 5 forks source link

working? #11

Closed spencercap closed 3 years ago

spencercap commented 3 years ago

hi 👋 is this still working?

i get a 500 error every time i try to hit: https://whosampled-scraper.herokuapp.com/artist/2pac

i also trying installing locally and serving w nest but i get this error when i hit it from postman:

[7:28:39 PM] Starting compilation in watch mode...

[7:28:40 PM] Found 0 errors. Watching for file changes.

[Nest] 27672   - 08/11/2021, 7:28:41 PM   [NestFactory] Starting Nest application...
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [InstanceLoader] AppModule dependencies initialized +10ms
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [InstanceLoader] ArtistsModule dependencies initialized +1ms
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [RoutesResolver] AppController {}: +3ms
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [RouterExplorer] Mapped {, GET} route +3ms
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [RoutesResolver] ArtistsController {/artist}: +0ms
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [RouterExplorer] Mapped {/artist/:name, GET} route +1ms
[Nest] 27672   - 08/11/2021, 7:28:41 PM   [NestApplication] Nest application successfully started +1ms
node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

Error: socket hang up
    at connResetException (node:internal/errors:642:14)
    at TLSSocket.socketOnEnd (node:_http_client:486:23)
    at TLSSocket.emit (node:events:381:22)
    at endReadableNT (node:internal/streams/readable:1307:12)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  code: 'ECONNRESET',
  response: undefined
}

cheers!

spencercap commented 3 years ago

Ah! perhaps whosampled changed their hosting server to reject requests from headless browser User-Agents. i forked your repo, added the most basic request-x-ray drive to add a Firefox User Agent header and it seemed to work again.

i also made a PR back into yours in case you wanna merge it so it works again: https://github.com/thulioph/whosampled-scraper/pull/12

cheers

thulioph commented 3 years ago

Hey, @spencercap sorry for my delay, I didn't notice the service was not available anymore. Thanks to identify the issue and fix it with a PR, I really appreciate your help.