Skip to content
This repository was archived by the owner on Jan 31, 2021. It is now read-only.
This repository was archived by the owner on Jan 31, 2021. It is now read-only.

How to tell youtube-comments-task to use Shadow Socks proxy #4

Open

Description

@zhirshya

I just started to learn (node)js and want to scrape all comments of a list of youtube videos, by adding forEach loop and file output (for every video's comments) into your example code.
I got the following error for every youtube video id:

ERROR { component: 'fetch-first-page-token',
operation: 'fetch-first-page-token',
videoId: 'nPEYdw2Ssa8',
type: 'scraper-error',
message:
{ Error: connect ECONNREFUSED 8.7.198.45:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '8.7.198.45',
port: 443 } }

I'm behind GFW of china, using SS proxy through brook GUI client on MacOS.
Could you please tell me how to tell youtube-comments-task to use the SS proxy?

Activity

  1. philbot9 commented on Jul 7, 2018

    @philbot9
    Owner

    Hi there,

    The easiest thing would be to modify the request opts in https://github.com/philbot9/youtube-comments-task/blob/master/src/lib/utils/request.js#L7
    You will want to add your proxy configuration there. Refer to https://github.com/request/request

    The right way to do this would be to add support for an options parameter in youtube-comments-task. I.e. fetchComments(videoId, pageToken, { proxy: '123.123.123.123:8888' }).
    This package will eventually receive a major bump (see #3) so that option will likely have to wait until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions