Module: TitleGrabber

Defined in:
lib/title_grabber.rb,
lib/title_grabber/version.rb

Defined Under Namespace

Classes: MultiThreadedGrabber

Constant Summary collapse

DEF_OUT_PATH =
Pathname('out.csv')
CONNECT_TO =
30
READ_TO =
30
MAX_RETRIES =
3
MAX_THREADS =
Etc.nprocessors
URL_RE =
%r(https?://\S+)i
URL_HEADER =
-"url"
END_URL_HEAD =
-"end_url"
PAGE_TIT_HEAD =
-"page_title"
ART_TIT_HEAD =
-"article_title"
HEADERS =
[URL_HEADER, END_URL_HEAD, PAGE_TIT_HEAD, ART_TIT_HEAD].freeze
ART_TIT_SEL =
["article h1", "h1"].freeze
-".tweet.permalink-tweet"
TWEET_TXT_SELS =
%w(.tweet-text QuoteTweet).freeze
TWITTER_HOST =
-"twitter.com"
TWITTER_STATUS_RE =
%r(/status/\d+\z)
TWITTER_URL_PREFIX =
-"https://#{TWITTER_HOST}"
CSV_FIELD_SEP =
-","
VERSION =
"0.5.3"

Class Method Summary collapse

Class Method Details

.call(options) ⇒ Object



34
35
36
# File 'lib/title_grabber.rb', line 34

def self.call(options)
  MultiThreadedGrabber.new(options).call
end