Converting GData Rows to a List of Dicts - racing to something announce-able

by Mike Levin SEO & Datamaster, 07/25/2012

Okay, I have so much to do, and this is a perfect example of so much time slipping by. How can I just hit this eztab thing home? I need to have something announceable more than I have lately, and the file saving/emailing stuff is hardly announced/being used besides Tamika’s special case use. And I’m soooooo close. All it’s going to take is a few hours of focus to hit this thing home. I have this perpetual reluctance to dive in head-first. Why? 1, 2, 3…

1. Get back to a state where you even understand what you were doing, and have a little continuity of thought. Do this ASAP before too much of the day slips by. Okay, loaded a test spreadsheet, and am using functions that were converted to ezscrape, and I’m making the ezscrape tab get created. Now simply load the data back in from the sheet and populate a list of dicts. I already have the ascrapelist and bscrapelist listodicts being processed. I merely need to make bscrapelist different… loaded in!

Okay… so… what? So, I have an ezscrape tab existing already. I do, because I just created one.

rows = gdata.GetListFeed(key, worksheetid).entry for arow in rows: for akey in arow.custom: out(req, “ %s %s” % (akey, arow.custom[akey].text))

As alluring this is as being a list of dicts already, it’s not. Each row is a SpreadsheetList object, and not a native dict as it may appear. So, I have to do some one-to-one mapping between object times. Sooooo, to change something with the datastructure listed above into the list of dicts, I need…

rows = gdata.GetListFeed(key, worksheetid).entry for arow in rows: arowdict = {} for akey in arow.custom: if arow.custom[akey].text: arowdict[akey] = arow.custom[akey].text bscrapelist.append(arowdict)

Okay, I actually finished this bit of work yesterday. I introduced a bug that Justin G told me about this morning, and I fixed and released. I have to be extra careful like this now that Tiger is released to the public. I have to test various scenarios better before releasing generally. But ezscrape is now done, and it’s time to cut this journal entry and think a little about videos, personal brand, and the future of SEO.