guyblade.com #/


PSN
Gamercard


2007 Jun 13 anthy


Guy Blade Guy Blade---07:04:00


MySpace sucks
So earlier today, I decided to take a second stab at getting MySpace support to work in XPost. My previous attempts, according to the error message given by MySpace, had invalid dates. Well, I had fiddled around with it to no evail, so I decided to do the most straightfoward thing I could think of to ensure the appropriate date: scrape the one that MySpace puts on by default. For reasons that I cannot understand, I seem to still be getting errors when I post. These errors are still about the date. Perhaps the error's cause is elsewhere.



On a side note, C#'s language semantics make regular expressions just plain ugly. For example, to strip the "hour" field out of the webpage, I use this expression:





\\(\\s*\"postHour\"\\s*,\\s*(?<val>\\d*)\\s*





Now, I understand that Regex strings aren't supposed to be particularly readable or pretty, but it is just irritating to have to include two slashes in order to use some of the most common Regex wildcards. Also, the whole <val> thing just to get a subexpression seems silly. Why would I have a subexpression if I didn't want its value seperately?



Of course, had I not needed to match against quotes ("") I could have cut down on the number of slashes using the @"string" string literal construct in C#, but since I did, I was SOL.



Published by XPost


Permalink to this post     Com/0

Archive
Copyright 2002-2024 Blade Libergnosis//Powered By Blogger