Skip to content

Commit

Permalink
Test out heroku #6
Browse files Browse the repository at this point in the history
  • Loading branch information
zulq9 committed Dec 24, 2018
1 parent 259de31 commit 722320f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/vlive.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = (client = Discord.Client) => {
try{
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();
page.setUserAgent('Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36');
//page.setUserAgent('Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36');

await page.goto(url);
await page.waitForSelector('.article_content');
Expand Down Expand Up @@ -66,6 +66,7 @@ module.exports = (client = Discord.Client) => {
const button = await article.$('.article_link');
button.click();
await page.waitForNavigation();
await page.waitFor(1000);

var engSub = await page.$eval('.u_rmc_caption_btn > span', sub => sub.innerHTML).catch(e => {return 'None'});

Expand Down

0 comments on commit 722320f

Please sign in to comment.