Skip to content

Instantly share code, notes, and snippets.

View sample7.rb
# sample5.rb をベースに Clips を取り出します。Clips は /username/ディレクトリ配下にあるため、観た映画より取り出しやすいです。
require 'nokogiri'
require 'anemone'
opts = {
depth_limit: 2
}
URL = "https://filmarks.com/users/hogehoge" # hogehoge に Username を入れてください
Anemone.crawl(URL, opts) do |anemone|
anemone.focus_crawl do |page|
page.links.keep_if { |link|
View sample6.rb
# -- coding: utf-8
require 'nokogiri'
require 'anemone'
opts = {
depth_limit: 2
}
URL = "https://filmarks.com/users/<username>" # Username を入れてください
View sample5.rb
require 'nokogiri'
require 'anemone'
opts = {
depth_limit: 1
}
URL = "https://filmarks.com/users/hogehoge" # hogehoge に Username を入れてください
Anemone.crawl(URL, opts) do |anemone|
anemone.focus_crawl do |page|
page.links.keep_if { |link|
View sample4.rb
# -- coding: utf-8
require 'nokogiri'
require 'anemone'
opts = {
depth_limit: 1
}
URL = "https://filmarks.com/users/<Username>" # Username を入れてください
Anemone.crawl(URL, opts) do |anemone|
View sample3.rb
# -- coding: utf-8
require "open-uri"
require "rubygems"
require "nokogiri"
url = "https://filmarks.com/people/63083"
charset = nil
html = open(url) do |f|
  charset = f.charset
View sample2.rb
# -- coding: utf-8
require "open-uri"
require "rubygems"
require "nokogiri"
url = "https://filmarks.com/people/63083"
charset = nil
html = open(url) do |f|
  charset = f.charset
View sample1.rb
# -- coding: utf-8
require "open-uri"
require "rubygems"
require "nokogiri"
url = "https://filmarks.com/people/63083"
charset = nil
html = open(url) do |f|
  charset = f.charset