Skip to content

Commit

Permalink
Merge pull request #93 from theslavicbear/theslavicbear-patch-2
Browse files Browse the repository at this point in the history
Add files via upload
  • Loading branch information
theslavicbear authored Dec 7, 2023
2 parents 198c246 + 192ca21 commit 39f1362
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Site/Chyoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,19 @@ def __init__(self, url):
return None

soup=BeautifulSoup(page.content, 'html.parser')
self.title=soup.find('h3').get_text()
if self.title=='Log In':
try:
self.title=soup.find('h1').get_text()
self.backwards = False
except:
pass
elif not self.backwards:
self.partial = True
if soup.find('h3') is None:
self.title=soup.find('h1').get_text()
self.backwards=False
else:
self.title=soup.find('h3').get_text()
if self.title=='Log In':
try:
self.title=soup.find('h1').get_text()
self.backwards = False
except:
pass
elif not self.backwards:
self.partial = True


#get update timestamp:
Expand Down

0 comments on commit 39f1362

Please sign in to comment.