|
Defines |
#define | PARSERYAHOO_GRAB_RETRIES 3 |
| Number of times to retry in case of wget failure.
|
#define | PARSERYAHOO_DEPTH_TO_PARSE 90 |
| Default Depth to Parse, if none is given as a parameter.
|
#define | PARSERYAHOO_EVENTS_PER_PAGE 10 |
| Number of Events given on each main page.
|
#define | PARSERYAHOO_SUBPAGE_PREFIX_LENGTH 27 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_EVENT_PREFIX_LENGTH 34 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_EVENT_BEGIN_LENGTH 63 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_CATEGORIES_AFTER_BEGIN_LENGTH 23 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_DESCRIPTION_BEGIN_LENGTH 23 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_CATEGORIES_BEGIN_LENGTH 20 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_MAX_CATEGORY_NAME_LENGTH 64 |
| Length of important substring; #define'd here for convenience.
|
#define | PARSERYAHOO_MAX_SUBPAGE_URL_LEN 300 |
| Maximum number of characters (with a bunch of padding) in the URL of a subpage.
|
#define | PARSERYAHOO_MAX_PAGE_URL_LEN 400 |
| Maximum number of characters (with a bunch of padding) in the URL of a main page.
|
#define | PARSERYAHOO_STARTING_URL_LEN 340 |
| Length of the starting URL.
|
Functions |
bool | findSubPages (FILE *page) |
| Finds sub-pages given Yahoo Local's main search results page.
|
bool | findNextPage () |
| Finds the next main-page, based on the current page.
|
bool | yahooIsEmptyFile (char *fileName) |
| Determines if a given file is empty (most likely due to wget failure).
|
Event::EventCategory | processCategoryString (char *category) |
| Map a found Category string to our representation of Category.
|
Event | parseEvent (char *url) |
| Creates an Event from a string representation of a URL.
|
Event | getEventFromFile (FILE *subPage) |
| Creates an Event based on a given HTML file for a single Event on Yahoo Local.
|
bool | findMetaLine (size_t size, char **str, FILE *subPage) |
| Advances the current line of the given file to the metadata line, which has info we want. Upon return, str contains desired line.
|
bool | findDetailsLine (size_t size, char **str, FILE *subPage) |
| Advances the current line of the given file to the details line, which has info we want. Upon return, str contains desired line.
|
bool | findCatDescLine (size_t size, char **str, FILE *subPage) |
| Advances the current line of the given file to the line with the description and categories, which has info we want. Upon return, str contains desired line.
|
bool | handleMetaLine (char *str, Event *newEvent) |
| Fills in the Event with information from the meta line (from findMetaLine).
|
bool | handleDetailsLine (char *str, Event *newEvent) |
| Fills in the Event with information from the details line (from findDetailsLine).
|
bool | handleCatDescLine (char *str, Event *newEvent) |
| Fills in the Event with information from the categories/description line (from findCatDescLine).
|
Variables |
char | yahoo_Sub_Pages [PARSERYAHOO_EVENTS_PER_PAGE][PARSERYAHOO_MAX_SUBPAGE_URL_LEN] |
| Sub-Pages found during a single parse of the main page.
|
char | yahoo_Next_Page [PARSERYAHOO_MAX_PAGE_URL_LEN] |
| The next main page to parse.
|
FILE * | yahoo_Page |
| Currently-processed webpage.
|
HTMLGrabber | yahoo_myGrabber |
| Grabber of ye olde HTML.
|
char * | subpage_Prefix = "<div class=\"cont\"><a href=\"" |
| Prefix of line containing start of Event info on main page.
|
char * | event_Title_Prefix = "<meta name=\"DESCRIPTION\" content=\"" |
| Prefix of line containing basic meta info on Event page.
|
char * | event_Begin = "<div id=\"ylsband\"><div class=\"ylsdefbxc\"><div class=\"ylstopbx\">" |
| Prefix of line containing details info on Event page.
|
char * | categories_After_Begin = "<div class=\"ylsmrinfo\">" |
| Prefix of line AFTER line containing cat / desc info on Event page.
|
char * | description_Begin = "Event Information: </b>" |
| Beginning of Description section on Categories/Description line on Event page.
|
char * | categories_Begin = "Category Types: </b>" |
| Beginning of Categories section on Categories/Description line on Event page.
|
char * | yahoo_Starting_Url = "http://local.yahoo.com/results;_ylt=At1y0HMWlf845KuB5bQ750uHNcIF;_ylu=X3oDMTBxOHY3ZWlmBF9zAzk2NjEzNzY3BHNlYwNwYWdpbmF0aW9u?stx=Events+Performances&city=North+Providence&state=RI&dma=521&uzip=02911&radius=50&fmap=134217177&sortby=aevent&flnstr=&flsstr=&search=event&ed=zKqLVq131Dwihmm_.HGw5Vos.rEs2X72GC4EcJiVi9qt.id5&ppg_nm=2&pg_nm=1&xargs=" |
| Starting URL.
|
int | events_Processed = 0 |
| Number of Events processed. Only used for output convenience.
|