Skip to content

Instantly share code, notes, and snippets.

@riteshkawadkar
Last active April 6, 2022 13:24
Show Gist options
  • Save riteshkawadkar/3839a6d0b12411e4e0848bb8b0201a1b to your computer and use it in GitHub Desktop.
Save riteshkawadkar/3839a6d0b12411e4e0848bb8b0201a1b to your computer and use it in GitHub Desktop.
p = sample_search_projects()
if p:
print('Found projects: {}'.format(p))
for x in p.get('projects'):
try:
bid = get_bids(session, **get_bids_data)
if bid:
print('Found bids: {}'.format(len(bid['bids'])))
if len(bid['bids']) < 20:
bid_data = {
'project_id': int(project_id),
'bidder_id': my_user_id,
'amount': amount - 75,
'period': 7,
'milestone_percentage': 20,
'description': bid_description,
}
b = place_project_bid(session, **bid_data)
except BidsNotFoundException as e:
print('Error message: {}'.format(e.message))
print('Server response: {}'.format(e.error_code))
continue
except:
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment