Last active
April 6, 2022 13:24
-
-
Save riteshkawadkar/3839a6d0b12411e4e0848bb8b0201a1b 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
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