Method: Discuz::CurlAgent#initialize
- Defined in:
- lib/discuz_robot.rb
#initialize ⇒ CurlAgent
Returns a new instance of CurlAgent.
42 43 44 45 46 47 48 |
# File 'lib/discuz_robot.rb', line 42 def initialize = "/tmp/c.txt" `test #{@cookie_file} && rm #{@cookie_file}` # remove existing cookie file if any user_agent = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6" @curl_cmd = %Q(curl --stderr /dev/null -A "#{user_agent}" -b #{@cookie_file}) end |