Created
November 15, 2011 09:23
-
-
Save Nub/1366546 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // main.m | |
| // ImageNabber | |
| // | |
| // Created by Zachry Thayer on 11/15/11. | |
| // Copyright (c) 2011 Zachry Thayer. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| int main (int argc, const char * argv[]) | |
| { | |
| @autoreleasepool { | |
| NSString *callsign = @"KROQ"; | |
| NSString *searchURL = [NSString stringWithFormat:@"http://www.bing.com/images/search?q=%@+logo&go=&qs=n&sk=&sc=8-4&form=QBIR", callsign]; | |
| NSString *regexOneliner = [NSString stringWithFormat:@"/usr/local/bin/wget -O %@.txt \"%@\";sleep 2;cat %@.txt | perl -ne '/class=\"sg_t\" src=\"([^>]*)\" style=\"([^>]*)\"/; print \"$1,\" ' >> %@2.txt", | |
| callsign, searchURL, callsign, callsign]; | |
| NSLog(regexOneliner); | |
| system([regexOneliner UTF8String]); | |
| } | |
| return 0; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment