Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
karia committed Sep 9, 2019
0 parents commit 07bf4cb
Show file tree
Hide file tree
Showing 7 changed files with 422 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.bundle/
vendor/
node_modules/

7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "twitter"
48 changes: 48 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
buftok (0.2.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.11)
http (3.3.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
http-form_data (2.1.1)
http_parser.rb (0.6.0)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
multipart-post (2.1.1)
naught (1.1.0)
public_suffix (4.0.1)
simple_oauth (0.3.1)
thread_safe (0.3.6)
twitter (6.2.0)
addressable (~> 2.3)
buftok (~> 0.2.0)
equalizer (~> 0.0.11)
http (~> 3.0)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
memoizable (~> 0.4.0)
multipart-post (~> 2.0)
naught (~> 1.0)
simple_oauth (~> 0.3.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)

PLATFORMS
ruby

DEPENDENCIES
twitter

BUNDLED WITH
1.17.2
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const puppeteer = require('puppeteer');

(async() => {
const browser = await puppeteer.launch();
const page = await browser.newPage();

await page.goto('https://www.youtube.com/channel/UCDh2bWI5EDu7PavqwICkVpA/community');
// await page.waitFor(10000);
//await page.screenshot({path: 'mico.png', fullPage: true});
//await console.log("screenshot");

const scrapingData = await page.evaluate(() => {
const dataList = [];
const nodeList = document.querySelectorAll("#published-time-text a");

nodeList.forEach(_node => {
dataList.push(_node.getAttribute("href"));
});

return dataList;
});

console.log(scrapingData);
await browser.close();
})();
303 changes: 303 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 07bf4cb

Please sign in to comment.