Solutions to slow internet in Vietnam: Download Bitshare with great speed

Submitted by tomo on August 5, 2011 - 4:04am

The internet speed in Vietnam is back to dialup level.  There are rumors of another cable cut as well as maintenance that will last more than another week.  This after weeks of "undersea cable maintenance" after which we had awesome download speeds for awhile.  This means a lot of large transfers from sites outside of Vietnam are unbearably slow.  In the meantime, go buy your favorite movies or TV shows on DVD for 10,000 VND, it'll be quicker.

There is a time of day when speeds are much better.  It's in the wee hours of the morning, when most of the population has stopped downloading porn for the day.

If you're slightly resourceful you can take advantage of that window of high speed internet by downloading to a server outside Vietnam during the daytime and then downloading from there to your home PC at nighttime.

Don't have your own server? Virtual private servers are cheap, and having one also lets you have your own personal proxy server to access Facebook in Vietnam when it's down.

So the idea is the download to the overseas server during the day, then offload it at night.  But for many file uploading sites (like Rapidshare, Megaupload, etc.) you can't just hotlink to a file, so regular wget won't work.  

So I looked for ways around this.  Here's how to download Bitshare files to a server from the command line.

First, when hacking around in Bitshare's javascript code, I noticed they use the runde function that so many other file-sharing sites use to do their countdown.  I have no idea what runde means or if it's from a library or if everyone's just copying everyone else's code.  The countdown is also resource (cpu) expensive, as it's updating every fraction of a second.  In Chrome, if the tab isn't currently active, the browser will deprioritize javascript running in that window and so the timer will run really slow.

Fortunately, it's really easy to hack the timer.  In Chrome Developer's console, just enter:

time="1.0"

You mean need to do it a few times depending on where in the timer update we are in when we reset the timer (it may be in the process of updating).  But you should eventually get it to 0.

You'll need the Chrome cookies.txt export extension to easily access your cookies from Bitshare.com.

Save your exported cookies to cookies.txt in your current directory on the server.  Then run the script with the current page URL, copy and paste the link for download that appears after you fill in the captcha, and enter the name of the file to download to (we could probably get this automatically from wget, feel free to send me a patch).

A variant on this should work for most file uploading sites which give you a download link after entering the captcha.  For ones where download begins when submitting the captcha form, it's a bit different.

Attachments: 
Read the rest of this article...
tomo
The file has been renamed because I forgot Apache wouldn't allow downloading files with .sh extension.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <h2> <h3> <h4> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
By submitting this form, you accept the Mollom privacy policy.

Recent comments

Latest Technical Posts

I also post a lot of technical material unrelated to Vietnam that doesn't hit the home page.

  • Definition of Startup: What isn't a startup? : What is a startup? We're in the middle of a tech boom and it's become fashionable to either work for a startup or to be a startup. But what is a startup? How do you know that company offering you a...
  • My Startup Experiences : I've been involved in start ups for over a decade now. During that time I've worked for companies in varying stage of development. Not all of them were startups. But how can you tell if it is or not...
  • Code Retreat 2012 - Ho Chi Minh City : $(document).ready(function(){ $('.geshifilter').hover(function(){console.log(this);console.log($(this));$(this).css('position', 'relative').css('width', '800px').css('z-index', 1000);}, function...
  • Internet Censorship in Southeast Asian Countries (Myanmar, China, Malaysia, Thailand, Cambodia, Vietnam) : Vietnam has been labeled an "enemy of the Internet" by Reporters Without Borders. There have been a lot of cases of bloggers being targeted, harrassed, and arrested. But RSF (Reporters Sans...
  • Using 3G Internet in Cambodia : On my most recent trip to Cambodia I bought a Cambodian SIM card so that I could both make calls and use the Internet on my smartphone. At the Moc Bai/Bavet border are a number of Khmer people (who...
  • MailChimp vs poMMo, Mailman, Phplist - Self-Host or Outsource Your Mailing List? : Use your own mail server or outsource it? Let's say you have a rather large mailing list of a few thousand email addresses and, well, sending it out with GMail is no longer cutting it. What are your...
  • Internet in Vietnam - Good, Bad, Ugly : If you ask Vietnamese officials, you'll hear such hyperbole as "the Internet service development in Vietnam is in no way inferior to developed countries in the world" (Mai Liem Truc, former Deputy...
  • poMMo proBLEMs : poMMo is free open source mailing list management software. It's written in PHP and pretty basic but does give a decent management interface. However, it's no longer maintained. There is a GitHub...
  • Preventing Repetitive Stress Injuries for Programmers and Writers : My situation I'm a career programmer who has suffered from pain in my hands and arms for several years. Like carpal tunnel syndrome, this pain is from damage to tissue (including tendons) caused by...
  • Calling the US for free from foreign countries : Calling US numbers from the US is pretty trivial and nearly free. But calling from another country means either: - paying for long distance from your telephone company - using a phone card to call...
© 2010-2013 Saigonist.