Skip to content

Commit

Permalink
chore:compare all urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Feb 26, 2024
1 parent 9efaca6 commit 4eaafdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class GetSource:
"湖南卫视",
"翡翠台",
]
importantUrlsNum = 15
importantUrlsNum = 20

def __init__(self):
self.driver = self.setup_driver()
Expand Down Expand Up @@ -143,10 +143,10 @@ async def visitPage(self, channelItems):
allRangeElement = allRangeElement[:useNum]
for elem in allRangeElement:
urls.append(elem.text)
urls = await self.compareSpeed(urls)
allUrls = list(
dict.fromkeys(channelObj[name] + urls if isImportant else urls)
urls = await self.compareSpeed(
channelObj[name] + urls if isImportant else urls
)
allUrls = list(dict.fromkeys(urls))
channelUrls[name] = allUrls
self.outputTxt(cate, channelUrls)
await asyncio.sleep(1)
Expand Down

0 comments on commit 4eaafdb

Please sign in to comment.