Skip to content

Instantly share code, notes, and snippets.

@iurikura
Created January 8, 2017 06:58
Show Gist options
  • Save iurikura/b7d558c0e5dd4990b91516cfb306c67f to your computer and use it in GitHub Desktop.
Save iurikura/b7d558c0e5dd4990b91516cfb306c67f to your computer and use it in GitHub Desktop.
# -- 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
  f.read
end
doc = Nokogiri::HTML.parse(html, nil, charset)
p doc.title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment