Class: U3d::UnityForums

Inherits:
Object
  • Object
show all
Defined in:
lib/u3d/unity_versions.rb

Instance Method Summary collapse

Instance Method Details

#page_content(url) ⇒ Object



38
39
40
41
42
43
# File 'lib/u3d/unity_versions.rb', line 38

def page_content(url)
  fetch_cookie
  request_headers = { 'Connection' => 'keep-alive', 'Cookie' => @cookie }
  UI.verbose "Fetching from #{url}"
  Utils.page_content(url, request_headers: request_headers)
end

#pagination_urls(url) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/u3d/unity_versions.rb', line 29

def pagination_urls(url)
  # hardcoded for now
  # otherwise maybe
  # # <div class="PageNav" data-page="7" data-range="2" data-start="5" data-end="9" data-last="10" data-sentinel="{{sentinel}}" data-baseurl="threads/twitter.12003/page-{{sentinel}}"
  #  <span class="pageNavHeader">Page 7 of 10</span>
  [url,
   "#{url}page-2"]
end