define(ACCEPT, "text/xml,application/xml,application/xhtml+xml,text/html q=0.9,text/plain q=0.8"). The code only accepts gzip encoding, although it would be easy to make it accept deflate, but what web server nowadays actually serves a slower and less efficient compression when it can offer something much better :). The parse and parse_http functions I found from some code that Joe Armstrong coded some time ago. inets' http client in the past I suppose was pretty lousy, but it seems ok to me now) because I can't get the raw binary data from ibrowse like I can from inets (if you need to use ibrowse for your project you can convert the response from ibrowse to binary and adapt this code and it should work fine, but this way should be a little more performant). ![]() I'm using the built in inets module rather than the ibrowse module (which it seems everyone uses for historical reasons. If you're like me and you need to grab a lot of web pages and you pay for your bandwidth with a hosted provider, then you'll quickly go broke. Cons of iExplorer: Unable to move files from computer to iOS device. ![]() Mount iPhone, iPad, or iPod as a disk in Finder or Windows Explorer Supports all types of iPhone, iPad or iPod Models. There are a few tutorials out there showing you how to grab a web page in Erlang, but unfortunately they can only be used if you're going to be doing some very light webpage grabbing. Pros and Cons of iExplorer Pros of iExplorer: Backup music, videos, photos, messages, files, etc. First post! Instead of the typical blogging mainstay of a stupid first post that really is no value to anyone, I'm going to post some code on how to grab a web page that's been server side compressed with gzip (html header "content-encoding: gzip").
0 Comments
Leave a Reply. |