Tag Archive > ADown

ADown: Back in Action!

» 10 July 2012 » In C#, Open-Source, Programming, Releases » 2 Comments

After so many months of being still, I didn’t know ADown(Facebook Album Downloader) is not quite working. Today, I updated the code and the binary. It’s now usable again!

ADown - Facebook Album Downloader

Facebook Album Downloader

So what exactly happened?

Mainly, there has been an issue with the function ParseAlbumUrl. If you want to see the actual differentiation, you can head over here. Meanwhile, the new code looks like this:

/// <summary>
/// Parses the album URL.
/// </summary>
/// <param name="url">The URL.</param>
/// <returns>A string list containing the short album ID, user ID and the validity</returns>
private List<string> ParseAlbumUrl(string url)
{
    List<string> details = new List<string>();
    Match m;

    // Check if the URL has the user id and the album id parameter
    // And store it in the list
    if (Regex.IsMatch(url, @"a\.[0-9]+\.[0-9]+\.[0-9]+(&.+)?$"))
    {
        m = Regex.Match(url, @"a\.([0-9]+)\.[0-9]+\.([0-9]+)(&.+)?$");
        details.Add(m.Groups[2].Value);
        details.Add(m.Groups[1].Value);
        details.Add("valid");
    }
    else
    {
        // If it's not, clear the list and add null, and invalid.
        details.Clear();
        details.AddRange(new string[] { "null", "null", "invalid" });
    }

    return details;
}

And of course, there’s a new feature. I added a parent directory for each album. The directory of the album owner’s name is first created. This will eliminate confusion and album merge from different owners.

Download it here.

Continue reading...

Tags: , , , , ,

Downloading Facebook Albums with C#

» 30 March 2011 » In C#, Open-Source, Programming, Releases » 3 Comments

If you can remember, I already posted a script that does the same job (downloading facebook albums) written in Perl. Sadly, the script doesn’t work anymore, and because of the bad practices I have applied to it, I felt lazy updating. So instead, I created another project. This time, it’s on C#. So the project has a GUI, which most of the users will love.

I actually started this 20 days ago. I didn’t have the chance to work on this until yesterday night. What it does is pretty simple. It uses the Facebook Graph API, so there would be a great, great chance that this will not fail. So let us take a look at the process.

ADown Flowchart

ADown Flowchart

To be honest, this is the first time I used a flowchart on my projects. At first I was not convinced by this, but then I just realized this is one of the best ways to explain how a process takes action.

I also used an external JSON parser (since most of what I found are serializers). Credits goes here for the parser.

Here’s the screenshot of the GUI:

ADown Screenshot

ADown Screenshot

There are some notes I have to mention:

  • Downloading speed will depend on the connection speed
  • The download folder by default is in the Documents folder named ‘ADown’
  • Each picture will be named based on the Photo ID in the Graph API

And of course, the features:

  • Threaded
  • Verbose
  • Uses Facebook Graph API
  • Able to change download folder
  • Creates a folder for every album
  • Accepts the Album URL (easy copy-paste)

If you have no permission in that album (although it’s visible to you in Facebook) you won’t be able to access it in the Graph API. An example would be a public album of someone who’s not in your friend list.

The source code of course is freely available at github and released under BSD 3-clause license. Help me maintain it, by forking. :)

The executable file is also available, that is if you do not have a VS2010 installed. You need to install .NET Framework 4 first. Download the executable file here.

That’s all for this project, please leave comments if you have something in mind. Thank you.

Continue reading...

Tags: , , , , , , , ,