-
Notifications
You must be signed in to change notification settings - Fork 31
Bakhmat Vladislav #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bakhmat Vladislav #20
Conversation
rssreader/rssreader.py
Outdated
| print(open(file, 'r').read()) | ||
|
|
||
|
|
||
| def news_parsing(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
К сожалению, не работает
# rss-reader https://news.tut.by/rss/geonews/minsk.rss
Traceback (most recent call last):
File "/usr/local/bin/rss-reader", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/rssreader/cmd.py", line 5, in main
rssreader.main()
File "/usr/local/lib/python3.8/site-packages/rssreader/rssreader.py", line 60, in main
news_parsing()
File "/usr/local/lib/python3.8/site-packages/rssreader/rssreader.py", line 22, in news_parsing
making_log(1, "Opened URL for news reading, URL: %s" % args.source)
NameError: name 'args' is not defined
rssreader/rssreader.py
Outdated
|
|
||
| def filewrite(self): | ||
| for index in range(len(self.title)): | ||
| fp=open("feeddata.txt","a") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Обычно работа с файлами идет через контекстные менеджеры, очень советую их использовать :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправил, спасибо!
| self.links=[] | ||
| self.datalist=[] | ||
|
|
||
| def feed_find(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Советую добавить тут докстринги. Сложновато понять, что это функция делает
…read README for understanding. Good luck :)))
|
Выдает следующую ошибку при попытке установить пакет (из-за того, что пропущена запятая в зависимостях) ERROR: Could not find a version that satisfies the requirement fpdf==1.7.2lxml==4.4.1 (from rssreader==1.3) (from versions: 1.7, 1.7.2)
ERROR: No matching distribution found for fpdf==1.7.2lxml==4.4.1 (from rssreader==1.3) |
|
При попытке сгенерировать новости в pdf создается только картинка, но самого pdf файла нет |
такой расклад существует при условии если текст содержит кирилицу или некие некодируемые символы, вроде я описал такое в readme |
|
No description provided.