format Black

This commit is contained in:
Rykov7
2023-02-22 18:53:12 +03:00
parent 23a93b5dbd
commit d0cf0762c8
13 changed files with 356 additions and 205 deletions
+3 -3
View File
@@ -1,13 +1,13 @@
from bs4 import BeautifulSoup
from urllib.request import urlopen
html = BeautifulSoup(urlopen('https://telegra.ph/pythonchatru-07-07'), 'lxml')
html = BeautifulSoup(urlopen("https://telegra.ph/pythonchatru-07-07"), "lxml")
def fetch_rule(li):
li = int(li)
lis = html.find_all('li')
lis = html.find_all("li")
if li <= len(lis):
return lis[li - 1].text
else:
return f'Пока не придумали.'
return f"Пока не придумали."