Sep-20-2021, 08:53 AM
(This post was last modified: Sep-20-2021, 08:53 AM by zeek.
Edit Reason: simplification
)
My code is too long as I'm repeating the same function for every if statement
I'm doing it with BeautifulSoup since it's a web scrapping project
Basically it's like this:
Except with a tons more "tags" or conditions
I was planning on using dictionaries but I don't know how to implement it since the results are like:
Name: name 1
Chapters: unique no. of chapters
Date : date 1
then there are like 1000 of those ^
soo.. the last will be
Name: name 1000
Chapters: unique no. of chapters
Date: date 1000
I'm doing it with BeautifulSoup since it's a web scrapping project
Basically it's like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
if onlySubscribed = = "Y" : if onlyToday = = "Y" : #Do function else : #Do function else : if onyToday = = "Y" : #Do function else : #Do function |
I was planning on using dictionaries but I don't know how to implement it since the results are like:
Name: name 1
Chapters: unique no. of chapters
Date : date 1
then there are like 1000 of those ^
soo.. the last will be
Name: name 1000
Chapters: unique no. of chapters
Date: date 1000