Skip to content

Commit

Permalink
format code, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodytrash committed Jul 10, 2024
1 parent 1a285c3 commit 84891a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiktok-live-connector",
"version": "1.1.8",
"version": "1.1.9",
"description": "Node.js module to receive live stream chat events like comments and gifts from TikTok LIVE",
"main": "index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class WebcastPushConnection extends EventEmitter {
* @param {object} [options[].requestOptions={}] Custom request options for axios. Here you can specify an `httpsAgent` to use a proxy and a `timeout` value for example.
* @param {object} [options[].websocketOptions={}] Custom request options for websocket.client. Here you can specify an `agent` to use a proxy and a `timeout` value for example.
* @param {object} [options[].signProviderOptions={}] Custom request options for the TikTok signing server. Here you can specify a `host`, `params`, and `headers`.
*/
*/
constructor(uniqueId, options) {
super();

Expand Down
4 changes: 2 additions & 2 deletions src/lib/tiktokUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ function getRoomIdFromMainPageHtml(mainPageHtml) {
let idx = 0;
do {
// loop thru many "room" excerpts and look for a match
idx = mainPageHtml.indexOf('roomId', idx+3);
idx = mainPageHtml.indexOf('roomId', idx + 3);
const excerpt = mainPageHtml.substr(idx, 50);
let matchExcerpt = excerpt.match(/roomId":"([0-9]+)"/);
if (matchExcerpt && matchExcerpt[1]) return matchExcerpt[1];
} while (idx >= 0);

let matchMeta = mainPageHtml.match(/room_id=([0-9]*)/);
if (matchMeta && matchMeta[1]) return matchMeta[1];

Expand Down

0 comments on commit 84891a9

Please sign in to comment.