ruial / 9gag

Download 9GAG posts and comments
MIT License
14 stars 6 forks source link

Error 403 #3

Closed iliiliiliili closed 4 years ago

iliiliiliili commented 4 years ago

Hello!

Starting form 26.02.2020 (today) I am receiving 403 errors (both from PC with Wi-Fi and phone with Termux and 4G) while trying to use this package. Possibly it's because of capcha. Error text below.

`Error: Request failed with status code 403 at createError (D:\FILES\$JAVASCRIPT_PROJECTS\Node.js\node_modules\axios\lib\core\createError.js:16:15) at settle (D:\FILES\$JAVASCRIPT_PROJECTS\Node.js\node_modules\axios\lib\core\settle.js:18:12) at IncomingMessage.handleStreamEnd (D:\FILES\$JAVASCRIPT_PROJECTS\Node.js\node_modules\axios\lib\adapters\http.js:201:11) at IncomingMessage.emit (events.js:215:7) at endReadableNT (_stream_readable.js:1184:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) { config: { adapter: [Function: httpAdapter], transformRequest: { '0': [Function: transformRequest] }, transformResponse: { '0': [Function: transformResponse] }, timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: [Function: validateStatus], headers: { Accept: 'application/json, text/plain, /', 'X-Requested-With': 'XMLHttpRequest', 'User-Agent': 'axios/0.18.0' }, method: 'get', url: 'https://m.9gag.com/v1/group-posts/group/default/type/trending', data: undefined }, request: ClientRequest { _events: [Object: null prototype] { socket: [Function], abort: [Function], aborted: [Function], error: [Function], timeout: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 6, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'm.9gag.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 9, connecting: false, _hadError: false, _parent: null, _host: 'm.9gag.com', _readableState: [ReadableState], readable: true, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular],

  [Symbol(asyncId)]: 8,
  [Symbol(kHandle)]: [TLSWrap],
  [Symbol(lastWriteQueueSize)]: 0,
  [Symbol(timeout)]: null,
  [Symbol(kBuffer)]: null,
  [Symbol(kBufferCb)]: null,
  [Symbol(kBufferGen)]: null,
  [Symbol(kBytesRead)]: 0,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
  _tlsOptions: [Object],
  _secureEstablished: true,
  _securePending: false,
  _newSessionPending: false,
  _controlReleased: true,
  _SNICallback: null,
  servername: 'm.9gag.com',
  alpnProtocol: false,
  authorized: true,
  authorizationError: null,
  encrypted: true,
  _events: [Object: null prototype],
  _eventsCount: 9,
  connecting: false,
  _hadError: false,
  _parent: null,
  _host: 'm.9gag.com',
  _readableState: [ReadableState],
  readable: true,
  _maxListeners: undefined,
  _writableState: [WritableState],
  writable: false,
  allowHalfOpen: false,
  _sockname: null,
  _pendingData: null,
  _pendingEncoding: '',
  server: undefined,
  _server: null,
  ssl: [TLSWrap],
  _requestCert: true,
  _rejectUnauthorized: true,
  parser: null,
  _httpMessage: [Circular],
  [Symbol(res)]: [TLSWrap],
  [Symbol(asyncId)]: 8,
  [Symbol(kHandle)]: [TLSWrap],
  [Symbol(lastWriteQueueSize)]: 0,
  [Symbol(timeout)]: null,
  [Symbol(kBuffer)]: null,
  [Symbol(kBufferCb)]: null,
  [Symbol(kBufferGen)]: null,
  [Symbol(kBytesRead)]: 0,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(connect-options)]: [Object]
},
_header: 'GET /v1/group-posts/group/default/type/trending HTTP/1.1\r\n' +
  'Accept: application/json, text/plain, */*\r\n' +
  'X-Requested-With: XMLHttpRequest\r\n' +
  'User-Agent: axios/0.18.0\r\n' +
  'Host: m.9gag.com\r\n' +
  'Connection: close\r\n' +
  '\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
  _events: [Object: null prototype],
  _eventsCount: 1,
  _maxListeners: undefined,
  defaultPort: 443,
  protocol: 'https:',
  options: [Object],
  requests: {},
  sockets: [Object],
  freeSockets: {},
  keepAliveMsecs: 1000,
  keepAlive: false,
  maxSockets: Infinity,
  maxFreeSockets: 256,
  maxCachedSessions: 100,
  _sessionCache: [Object]
},
socketPath: undefined,
method: 'GET',
path: '/v1/group-posts/group/default/type/trending',
_ended: true,
res: IncomingMessage {
  _readableState: [ReadableState],
  readable: false,
  _events: [Object: null prototype],
  _eventsCount: 3,
  _maxListeners: undefined,
  socket: [TLSSocket],
  connection: [TLSSocket],
  httpVersionMajor: 1,
  httpVersionMinor: 1,
  httpVersion: '1.1',
  complete: true,
  headers: [Object],
  rawHeaders: [Array],
  trailers: {},
  rawTrailers: [],
  aborted: false,
  upgrade: false,
  url: '',
  method: null,
  statusCode: 403,
  statusMessage: 'Forbidden',
  client: [TLSSocket],
  _consuming: true,
  _dumped: false,
  req: [Circular],
  responseUrl: 'https://m.9gag.com/v1/group-posts/group/default/type/trending',
  redirects: []
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: Writable {
  _writableState: [WritableState],
  writable: true,
  _events: [Object: null prototype],
  _eventsCount: 2,
  _maxListeners: undefined,
  _options: [Object],
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 0,
  _requestBodyBuffers: [],
  _onNativeResponse: [Function],
  _currentRequest: [Circular],
  _currentUrl: 'https://m.9gag.com/v1/group-posts/group/default/type/trending'
},
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype] {
  accept: [Array],
  'x-requested-with': [Array],
  'user-agent': [Array],
  host: [Array]
}

}, response: { status: 403, statusText: 'Forbidden', headers: { date: 'Wed, 26 Feb 2020 21:09:50 GMT', 'content-type': 'text/html; charset=UTF-8', 'transfer-encoding': 'chunked', connection: 'close', 'cf-chl-bypass': '1', 'set-cookie': [Array], 'cache-control': 'no-cache', 'x-frame-options': 'SAMEORIGIN', 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', server: 'cloudflare', 'cf-ray': '56b4e6fff8bcd895-CPH' }, config: { adapter: [Function: httpAdapter], transformRequest: [Object], transformResponse: [Object], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: [Function: validateStatus], headers: [Object], method: 'get', url: 'https://m.9gag.com/v1/group-posts/group/default/type/trending', data: undefined }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [TLSSocket], connection: [TLSSocket], _header: 'GET /v1/group-posts/group/default/type/trending HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'X-Requested-With: XMLHttpRequest\r\n' + 'User-Agent: axios/0.18.0\r\n' + 'Host: m.9gag.com\r\n' + 'Connection: close\r\n' + '\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, method: 'GET', path: '/v1/group-posts/group/default/type/trending', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, _redirectable: [Writable],

  [Symbol(isCorked)]: false,
  [Symbol(kOutHeaders)]: [Object: null prototype]
},
data: '<!DOCTYPE html>\n' +
  '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n' +
  '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n' +
  '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n' +
  '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n' +
  '<head>\n' +
  '<title>Attention Required! | Cloudflare</title>\n' +
  '<meta name="captcha-bypass" id="captcha-bypass" />\n' +
  '<meta charset="UTF-8" />\n' +
  '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n' +
  '<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />\n' +
  '<meta name="robots" content="noindex, nofollow" />\n' +
  '<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />\n' +
  '<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />\n' +
  `<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->\n` +
  '<style type="text/css">body{margin:0;padding:0}</style>\n' +
  '\n' +
  '\n' +
  '<!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/zepto.min.js"></script><!--<![endif]-->\n' +
  '<!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/cf.common.js"></script><!--<![endif]-->\n' +
  '\n' +
  '\n' +
  '\n' +
  '\n' +
  '</head>\n' +
  '<body>\n' +
  '  <div id="cf-wrapper">\n' +
  '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>\n' +
  '    <div id="cf-error-details" class="cf-error-details-wrapper">\n' +
  '      <div class="cf-wrapper cf-header cf-error-overview">\n' +
  '        <h1 data-translate="challenge_headline">One more step</h1>\n' +
  '        <h2 class="cf-subheadline"><span data-translate="complete_sec_check">Please complete the security check to access</span> m.9gag.com</h2>\n' +
  '      </div><!-- /.header -->\n' +
  '      \n' +
  '      <div class="cf-section cf-highlight cf-captcha-container">\n' +
  '        <div class="cf-wrapper">\n' +
  '          <div class="cf-columns two">\n' +
  '            <div class="cf-column">\n' +
  '            \n' +
  '              <div class="cf-highlight-inverse cf-form-stacked">\n' +
  '                <form class="challenge-form" id="challenge-form" action="/v1/group-posts/group/default/type/trending?__cf_chl_captcha_tk__=ff34fb896ecbeb4c8bdef5292494d89b3d3a2679-1582751390-0-ASU997jZkmZLJI8sksLzD6N9XBzqblERUhqKQkwIrY__kUxHjd2SaSle5umZndc0sMAQq8VqYbcoNctaNbE7aGtQGLs6CPpHe-uZhIpXUg4wqdLDfpQx8mtWRPAEMOkNmubXZO2jKgJIdC39r_QcPkhDJeBvjryEhF1ZN1MwRzZL9sh6FQMGu-MRa_nvzJNnYhEZqkrVGnaDJgE4ACe9C81bA9LV3Jq1eNZ-08es3Jj1NFKloKnS4eAd2Fj3iA9Fll2Pg_Gr5FuvOfOxx80u3N2RcBuaxkj3w5YQRR4tXIidbBuobx73TXYhW7S4-l_uXSSy5uvzvX7pfkOLGRUmkoyGxO4nr3jM5fqIZzJuQIUP8Z_uyHBl2Dd9oDTbKauVtC0VLVOyd9KOMtqChPDnq3fX_RM_ar2JQZXJeNDMStrzqtM83ArwK9Z2weS0zJPrIg" method="POST" enctype="application/x-www-form-urlencoded">\n' +
  '  <input type="hidden" name="r" value="a5a8adc101ed6cd57cf4dd6a40f8b4fbacfdea21-1582751390-0-AbCP17gVqzTij2fjT5NUJAmnAWH2CoRZsWCkI0vtVjRYF+F71LqIOQYonX7SGrewYfu4VWa5ZG0Q3Tz692PvCDpm6UsV0RXzLxfzgLqw2czUSY84P72a5rXfpz0fdgwz4bTtUoMQwLLcmEDjTy1mmzTCdzwhynJWKCB9zboJIxPQkclD9GXEoYMFrfDIcSEkAMqt3DSgQXWC+AN0K6PDDID+S5p4dvkxfXwmFSFNC2WLAp7vaPc0hjwbgmSh01jo5pV3JQUf5Pm418I3uhW3/mZSr3YZB0QIEGeGKo+MwtTpS218d5bZiZSN9COFxFgUlLcBWkE1nrmFIWlQWBkN51qJ37kcI/EX1T3+snn6/rCBqZnshHW2xpF6CmHSdB7AeXMq8nMC4Jq1zSn/5yIytE5gNQVYRjCFKS1tJVvdiCwJ0gi5vwUvQ4eLtEDoUGDTnB+aOXJ29Hq/oNE2BAqfBjRqQZPPvpb2a632OzrC5NGzg15AK/HhnYAx+hyLZdB1YsrvtPYAMk0FlziCC7B4fhFkc2a4Gxbn090ZC633EiDxAl+KaK1zPXSBNXbIiiZwE676hX7rrcpIiTikbX4wgOhKQsFS08aFi+tn6KUWboD8zpU95XWfCVBAWAyAWMNKGZQIQZlp2zMxFIZWuSq003vzc9DbhN7u6PrioCSsNSL+8JceZUA9LBGcP8hOH2KkWtiMGMUzBQ6zctPDO1eGa26wfy1ZQGpguijcJ630Fg1rRacT/SMY23Bkh9Dkk5tZWpeK3JgBfHf8T/+0FV3WM6KThC76wlZrSNxrUcieIJWMPoAq78k5OTcJnqwEPafzowcMHq2f1u7c6wDe/heoRu0b+ubQ6eWMd60a+gepZ8SspgRUpzZrHWNf7VS1YGfr1oOW9d/2vftklzviAx3z/eNcTqcrVlG14RPQYyUZ4jHOj4lf++cHfbSWavhhnenFycxe+ceARB7X4p5oIiQuJMbRK6xQPJbofPmJ68te/AjUovkSIgOF563hsjPY8SJglbo3RRXSBKBhbqo4IoR40cWQUQ8wRQIgIpCRUGIw4kBigRl8/wRk126IMVBGUWglQmU1LWJuUq1k4xZuyYS+wpyX4rI70OLZXO3upteHFENX05BhOOSvZpVMM3sfEw37aAnZech4rtIy6IGw0CEGsCv+eJeJyB90HZ9sAIZkKBtWfpcI/psSDrlTo6mp7TjGiiaKtlORmohfW50PJbICOTNSejUobdgXcVp4MWXG+bJBa/+nYYknEzckp+mt1zT6oXnQAvpyUNwaazzWfpMXKRr6CJWePnKVlndBLjPJrPnMrVCEw+mr5RL4XDIGhk8JlGUq16RKtb4iBUXRJOcu2iOlgzWz4Jt5pgcvt3dSu7Mf">\n' +
  '  <script type="text/javascript" src="/cdn-cgi/scripts/cf.challenge.js" data-type="normal"  data-ray="56b4e6fff8bcd895" async data-sitekey="6LfBixYUAAAAABhdHynFUIMA_sa4s-XsJvnjtgB0"></script>\n' +
  '  <div class="g-recaptcha"></div>\n' +
  '  <noscript id="cf-captcha-bookmark" class="cf-captcha-info">\n' +
  '    <div><div style="width: 302px">\n' +
  '      <div>\n' +
  '        <iframe src="https://www.google.com/recaptcha/api/fallback?k=6LfBixYUAAAAABhdHynFUIMA_sa4s-XsJvnjtgB0" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"></iframe>\n' +
  '      </div>\n' +
  '      <div style="width: 300px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">\n' +
  '        <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;"></textarea>\n' +
  '        <input type="submit" value="Submit"></input>\n' +
  '      </div>\n' +
  '    </div></div>\n' +
  '  </noscript>\n' +
  '</form>\n' +
  '\n' +
  '                \n' +
  '              </div>\n' +
  '            </div>\n' +
  '\n' +
  '            <div class="cf-column">\n' +
  '              <div class="cf-screenshot-container">\n' +
  '              \n' +
  '                <span class="cf-no-screenshot"></span>\n' +
  '              \n' +
  '              </div>\n' +
  '            </div>\n' +
  '          </div><!-- /.columns -->\n' +
  '        </div>\n' +
  '      </div><!-- /.captcha-container -->\n' +
  '\n' +
  '      <div class="cf-section cf-wrapper">\n' +
  '        <div class="cf-columns two">\n' +
  '          <div class="cf-column">\n' +
  '            <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>\n' +
  '            \n' +
  '            <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.</p>\n' +
  '          </div>\n' +
  '\n' +
  '          <div class="cf-column">\n' +
  '            <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>\n' +
  '            \n' +
  '\n' +
  '            <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.</p>\n' +
  '\n' +
  '            <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.</p>\n' +
  '            \n' +
  '              \n' +
  '            \n' +
  '          </div>\n' +
  '        </div>\n' +
  '      </div><!-- /.section -->\n' +
  '      \n' +
  '\n' +
  '      <div class="cf-error-footer cf-wrapper">\n' +
  '  <p>\n' +
  '    <span class="cf-footer-item">Cloudflare Ray ID: <strong>56b4e6fff8bcd895</strong></span>\n' +
  '    <span class="cf-footer-separator">&bull;</span>\n' +
  '    <span class="cf-footer-item"><span>Your IP</span>: 217.74.215.162</span>\n' +
  '    <span class="cf-footer-separator">&bull;</span>\n' +
  '    <span class="cf-footer-item"><span>Performance &amp; security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>\n' +
  '    \n' +
  '  </p>\n' +
  '</div><!-- /.error-footer -->\n' +
  '\n' +
  '\n' +
  '    </div><!-- /#cf-error-details -->\n' +
  '  </div><!-- /#cf-wrapper -->\n' +
  '\n' +
  '  <script type="text/javascript">\n' +
  '  window._cf_translation = {};\n' +
  '  \n' +
  '  \n' +
  '</script>\n' +
  '\n' +
  '\n' +
  '  \n' +
  '</body>\n' +
  '</html>\n'

} }`

hareendras commented 4 years ago

Experiencing the same error. Looks like new Captcha is in place

ruial commented 4 years ago

Cloudflare is blocking the requests. The http client has to be updated :(

luiscruzga commented 4 years ago

An alternative is to replace axios with puppeteer by setting the user agent in scraper.js `const axios = require('axios'); const axiosCloudflare = require('axios-cloudflare'); axiosCloudflare(axios); const mapper = require('./mapper'); const puppeteer = require('puppeteer'); var userAgent = require('user-agents'); const POSTS_PER_PAGE = 10; const BASE_POSTS_URL = 'https://m.9gag.com/v1/group-posts/group/default/type/'; const BASE_COMMENTS_URL = 'https://comment-cdn.9gag.com/v1/topComments.json?appId=a_dd8f2b7d304a10edaf6f29517ea0ca4100a43d1b&urls=http%3A%2F%2F9gag.com%2Fgag%2F';

class Scraper {

constructor(postCount, section = 'hot', commentCount = 0) { if (postCount <= 0) throw new Error('Post count must be positive'); if (commentCount < 0) throw new Error('Comment count cannot be negative'); this.postCount = postCount; this.section = section; this.commentCount = commentCount; }

postsUrl(lastPostId) { let url = BASE_POSTS_URL + this.section; if (lastPostId) url += '?id=' + lastPostId; return url; }

commentsUrl(postId) { return ${BASE_COMMENTS_URL}${postId}&order=score&commentL1=${this.commentCount}&commentL2=1; }

getPost9gag(url){
    return new Promise(function(resolve, reject) {
        (async () => {
            const browser = await puppeteer.launch({headless: true});
            const page = await browser.newPage();
            await page.setUserAgent(userAgent.toString())
            await page.goto(url);
            var html = await page.evaluate(() => document.getElementsByTagName('pre')[0].outerText);
            browser.close();
            resolve(JSON.parse(html));
        })();
    })
}

/**

}

module.exports = Scraper; `

ruial commented 4 years ago

@luiscruzga followed your puppeteer suggestion :)

@iliiliiliili thank you for reporting the issue, version 3.1.0 fixes the problem

I don't have much time to maintain this but I can accept pull requests for a faster fix

hareendras commented 4 years ago

Hello guys, I've updated to 9gag version 3.1.0. When I'm trying to use the scrapper I'm getting
"ReferenceError: HttpClient is not defined". Could you pls help me to fix? I'm newbie btw :)

const httpClient = new HttpClient();
await httpClient.init();
const scraper = new Scraper(httpClient, 10, 'hot', 0);``
hareendras commented 4 years ago

Hello guys, I've updated to 9gag version 3.1.0. When I'm trying to use the scrapper I'm getting "ReferenceError: HttpClient is not defined". Could you pls help me to fix? I'm newbie btw :)

const httpClient = new HttpClient();
await httpClient.init();
const scraper = new Scraper(httpClient, 10, 'hot', 0);``

I tried passing axios as follows const scraper = new Scraper(axios, 10, 'hot', 0) Now it fails with Error:

Request failed with status code 403

I get the captcaha response in data

ruial commented 4 years ago

@hareendras I forgot to export the new HttpClient

I've updated the README and bumped the package version

hareendras commented 4 years ago

Hello @ruial , Thank you for fixing that. I'm using this in heroku and looks like it requires the arguments --no-sandbox and --disable-setuid-sandbox puppeteer.launch to work. Created a pull request too. But I could not check this because I don't have working local instance of my app. Attahced is the current error I'm getting in heroku instance Capture

ruial commented 4 years ago

@hareendras I've merged the changes and everything should be working now.

I'm curious about how you guys use this package :) I created it initially because I had limited mobile data and browsing 9gag consumed too much, so I saved a page offline to view during commute

hareendras commented 4 years ago

@ruial. Yey! now it works. Check this bot I have created using this. :) Live FB messenger link source