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:
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:
if onlySubscribed == "Y": if onlyToday == "Y": #Do function else: #Do function else: if onyToday == "Y": #Do function else: #Do functionExcept 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