aapatre / Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE

Do you want to LEARN NEW STUFF for FREE? Don't worry, with the power of web-scraping and automation, this script will find the necessary Udemy coupons & enroll you for PAID UDEMY COURSES, ABSOLUTELY FREE!
GNU General Public License v3.0
3.14k stars 545 forks source link

Use f-strings instead of .format and string addition #53

Closed eklipse18 closed 3 years ago

eklipse18 commented 3 years ago

Using f-strings which are available from Python 3.6 or greater is a very helpful and human-readable tool for string concatenation.

For example, in line 141 to 142 in udemy_enroller_edge.py, you have to manually make page into a string:

url = "https://www.tutorialbar.com/all-courses/" + "page/" + str(
            page) + "/"

This can be simplified using f-strings:

url = f"https://www.tutorialbar.com/all-courses/page/{page}"
fakeid30 commented 3 years ago

@Vthechamp22 This issue has been solved with PR #60