Getting previous versions of MAGs

Dec 16, 2011 at 3:19 PM

This tool does an awesome job, but gets only the most recent published magazine, how do I get previous version(s)?

Jan 8, 2012 at 10:43 AM

Here is a quick and dirty hack to get older content:

Download the source for this project and build it.

Go to the MSDN Magazine RSS page: and click on options. There choose the topics and the year you are interested in. Then click 'Generate Feed' An RSS xml page opens, just copy the URL of it.

In Visual Studio open this solution and the file: /DataSource/MSDNMagazine/MSDNMagazineRepository.cs, in line 13 is the URL for the feed.

Replace it with the URL you just created, save and build, the run the app. It should now just download the articles matching your criteria.

Jan 8, 2012 at 3:06 PM

Thank you for the help.

I did change the code already, and made it parameterized to get the specific month/year I wanted :)

(did same for the Technet editions)

Jun 1, 2012 at 4:56 PM

Would you mind posting how you were able to parameterize the code to get a specific month?  I also updated the code to parse command line arguments but filtering by month is not a filter criteria that is available, at least not through the query string of the rss feed.  Did you take in all articles and then separate them in the code?  Thanks.

Jun 1, 2012 at 8:41 PM
Edited Jun 1, 2012 at 8:43 PM

Yeah the feed doesn't have an option to accept a particular month/year, so as you mentioned I had to iterate through all the articles and filter in code.

Though had some issues for the month findings as the exact date may vary, so had to add this logic to check Day as well:

 string rawDate = item.SelectSingleNode("pubDate").InnerText.Split(new string[] { "GMT" }, StringSplitOptions.RemoveEmptyEntries)[0];
                var pubDate = DateTime.Parse(rawDate);
                if (((pubDate.Month == Month - 1 && pubDate.Day > 15) || (pubDate.Month == Month && pubDate.Day <= 15)) && 
                        pubDate.Year == DateTime.Now.Year)

Hope this helps.



Jun 1, 2012 at 8:44 PM

Beautiful, thank you for posting this.