Skip to content

Commit

Permalink
chore:encode
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Feb 11, 2024
1 parent a512b98 commit 7ba40b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup_driver(self):

def getChannelItems(self):
# Open the source file and read all lines.
with open(self.source_file, 'r', encoding='utf-16') as f:
with open(self.source_file, 'r') as f:
lines = f.readlines()

# Create a dictionary to store the channels.
Expand Down Expand Up @@ -91,7 +91,7 @@ def removeFile(self):

def outputTxt(self,cate,channelUrls):
# Update the final file.
with open(self.finalFile, 'a', encoding='utf-16') as f:
with open(self.finalFile, 'a') as f:
f.write(cate + ',#genre#\n')
for name, urls in channelUrls.items():
for url in urls:
Expand Down

0 comments on commit 7ba40b0

Please sign in to comment.