Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __author__ = 'Mr.8ThBiT'
- import argparse
- def echo(courseid, coursename):
- coursename = coursename.replace(' ', '%20')
- print 'http://zips.udacity-data.com/{0}/{1}%20Videos.zip'.format(courseid, coursename)
- if __name__ == "__main__":
- parser = argparse.ArgumentParser(description="UDAYCITY download link generator by Mr.8ThBiT")
- parser.add_argument('-id', help="course id [udxxx]", action='store')
- parser.add_argument('-name', help='course title (Case Sensitive)')
- args = vars(parser.parse_args())
- if args['id'] == None or args['name'] == None:
- print ('use -h command to see help')
- exit(-1)
- echo(args['id'], args['name'])
Add Comment
Please, Sign In to add comment