Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

Events_by_location is pulling in events on incorrect dates #2

@nspilman

Description

@nspilman

Thank you for the great application. I have found that the location based searches work, except instead if pulling in results for Today, I get results across the board.

For example, I'm looking for Music events in Madison, WI-

TODAY = time.strftime("%Y-%m-%d")
fulllist = facebook_bot.get_events_by_location(43.0730517, -89.4012302, place_type='*',
                           distance=1000, scan_radius=500, base_time=TODAY,
                           fields=EVENT_FIELDS, f=None)

for line in fulllist:
    try:
        if line[0]['category'] == 'EVENT_MUSIC':
            try:
                eventname = line[0]['name']
                eventid = line[0]['id']
                eventstart = line[0]['start_time']
                eventlocation = line[0]['place']['location']['street']
                eventid = {'name':eventname, 'starttime': eventstart, 'location': eventlocation}
                if eventid not in dicts:
                    dicts.append(eventid)
            except:
                print('uhhm')
    except:
        continue

for i in dicts:
    print(i)

My results are as follows. Notice I get ZERO results for today, but instead results for dates across the board.

{'name': 'Le Vent Du Nord', 'location': '800 Langdon St', 'starttime': **'2018-05-05**T20:00:00-0500'}
{'name': "University Opera's La Boheme", 'location': '800 Langdon St', 'starttime': **'2018-02-23**T19:30:00-0600'}
{'name': 'Jack and Kitty: Vaudeville Jug Band Folk', 'location': '201 State St', 'starttime': '**2018-08-07**T19:00:00-0500'}
{'name': 'Propaganda Concert', 'location': '365 E Campus Mall, Ste 200', 'starttime': '2018-03-03T19:00:00-0600'}
{'name': 'Dirty Walter & The Fellas LIVE at SconnieBar', 'location': '1421 Regent Street', 'starttime': '2018-02-17T21:00:00-0600'}
{'name': 'Madtown Undergound Summer Kickoff!', 'location': '1206 Regent Street', 'starttime': '2018-06-02T19:00:00-0500'}
{'name': 'The Lacs - Dirt Rock Tour - The Annex, Madison, WI', 'location': '1206 Regent Street', 'starttime': '2018-04-15T18:00:00-0500'}

Thank you,
Nate

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions