Question

In: Computer Science

IST 411 What are the advantages of using CURL for handling webbot automation? What are some...

IST 411

  1. What are the advantages of using CURL for handling webbot automation?
  2. What are some of the disadvantages in creating a webot to perform content gathering?
  3. What networking protocols are supported with CURL?
  4. What is pycurl and what can you do with pycurl?
  5. Write a pycurl example that grabs some Web page HTML content.

Solutions

Expert Solution

1. What are the advantages of using CURL for handling web bot automation?

cURL can do all sorts of tricks in addition to merely downloading files. And cURL is very useful to test with a cookie, RESTful APIs, proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume, remotely parsing web pages.

3. What network protocols are supported with CURL?

The URL syntax is protocol-dependent. eg. http{s}://www.name.com

  • HTTP(HyperText Transfer Protocol)
  • HTTPS(HyperText Transfer Protocol Secure)
  • TFTP(Trivial File Transfer Protocol )
  • FTP(File Transfer Protocol)
  • FTPS(File Transfer Protocol Secure)
  • TELNET9TELecommunication NETwork)
  • DICT( Dictionary Server Protocol),
  • IMAP(Internet Message Access Protocol), IMAPS,
  • LDAP(Lightweight Directory Access Protocol ), LDAPS
  • POP3(Post Office Protocol 3), POP3S,
  • SFTP(Secure File Transfer Protocol)
  • SMB(Server Message Block), SMBS
  • SMTP(Simple Mail Transfer Protocol), SMTPS,
  • RTMP(Real-Time Messaging Protocol)
  • GOPHER, RTSP(Real-Time Streaming Protocol ), SCP

4. What is pycurl and what can you do with pycurl?

py+curl = python + transfer URL -- fetch URL using python programming.

pyURL is a Python interface to libcurl

USES:

  • It is very fast compared to libcURL.
  • supports most of the libcURL callbacks
  • Share and Multi interfaces
  • support SSL, authentication and proxy options
  • will be very helpful for network operations

5. Write a pycurl example that grabs some Web page HTML content.

import pycurl

from StringIO import StringIO

url = 'http://www.google.com/'

data = StringIO()

c = pycurl.Curl()

c.setopt(c.URL, url)

c.setopt(c.WRITEDATA, data)

c.perform()

c.close()

value = data.getvalue()

print (value)


Related Solutions

in C#, What is an exception and what are the advantages of exception handling?
in C#, What is an exception and what are the advantages of exception handling? What are the differences between the traditional error-handling methods and the object-oriented exception-handling methods and when should you use each one? Provide three to four paragraphs detailing your findings/views on these questions..provide examples with a simple code also..
What are some advantages and advantages of stick build roof? What are some advantages and advantages...
What are some advantages and advantages of stick build roof? What are some advantages and advantages of truss roofs?
what are some advantages and disadvantages of using online banking?
what are some advantages and disadvantages of using online banking?
What are some advantages and disadvantages of using a standard cost system?
What are some advantages and disadvantages of using a standard cost system?
What are some of the advantages of using molecular data in evolutionary studies
What are some of the advantages of using molecular data in evolutionary studies
What are some of the advantages and disadvantages of using an ion trap and a mass...
What are some of the advantages and disadvantages of using an ion trap and a mass analyzer?
What are the advantages of using project charters? What might be some disadvantages? What are the...
What are the advantages of using project charters? What might be some disadvantages? What are the differences between strategic plans and marketing plans?
What are some advantages of using non-financial performance measures? What are some reasons that non financial...
What are some advantages of using non-financial performance measures? What are some reasons that non financial performance measures at an operational level may not lead to improved profitability ?
What are some of the advantages and disadvantages of using ratio analysis to examine the financial...
What are some of the advantages and disadvantages of using ratio analysis to examine the financial performance of a bank?
What are some advantages of leasing?
What are some advantages of leasing?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT