-
Notifications
You must be signed in to change notification settings - Fork 32
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
Kotkovets Gennadiy #49
base: master
Are you sure you want to change the base?
Kotkovets Gennadiy #49
Conversation
long_description = f.read() | ||
|
||
|
||
setup( |
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.
почему-то help нехочет работать
# rss-reader --help
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/rss_app/main.py", line 21, in main
args=get_args()
File "/usr/local/lib/python3.8/site-packages/rss_app/main.py", line 17, in get_args
args = parser.parse_args()
File "/usr/local/lib/python3.8/argparse.py", line 1768, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/local/lib/python3.8/argparse.py", line 1800, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/local/lib/python3.8/argparse.py", line 2006, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/local/lib/python3.8/argparse.py", line 1946, in consume_optional
take_action(action, args, option_string)
File "/usr/local/lib/python3.8/argparse.py", line 1874, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/local/lib/python3.8/argparse.py", line 1044, in __call__
parser.print_help()
File "/usr/local/lib/python3.8/argparse.py", line 2493, in print_help
self._print_message(self.format_help(), file)
File "/usr/local/lib/python3.8/argparse.py", line 2477, in format_help
return formatter.format_help()
File "/usr/local/lib/python3.8/argparse.py", line 282, in format_help
help = self._root_section.format_help()
File "/usr/local/lib/python3.8/argparse.py", line 213, in format_help
item_help = join([func(*args) for func, args in self.items])
File "/usr/local/lib/python3.8/argparse.py", line 213, in <listcomp>
item_help = join([func(*args) for func, args in self.items])
File "/usr/local/lib/python3.8/argparse.py", line 213, in format_help
item_help = join([func(*args) for func, args in self.items])
File "/usr/local/lib/python3.8/argparse.py", line 213, in <listcomp>
item_help = join([func(*args) for func, args in self.items])
File "/usr/local/lib/python3.8/argparse.py", line 529, in _format_action
help_text = self._expand_help(action)
File "/usr/local/lib/python3.8/argparse.py", line 621, in _expand_help
return self._get_help_string(action) % params
ValueError: unsupported format character 'Y' (0x59) at index 26
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.
Исправлено
|
||
def print_news(self, entries): | ||
self.log.info("Printing news") | ||
for thefeedentry in entries: |
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_app/RSS.py
Outdated
"Link": thefeedentry.link, | ||
"Discription": BeautifulSoup(thefeedentry.description, "html.parser").text | ||
} | ||
print("--------------------------------------------------") |
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.
с аргументом --json утилита должна выводить json в консоль (чтобы этот аутпут можно было в прямом смысле конвертировать в json и использовать в других утилитах)
Однако сейчас аутпут не является корреткным json
нужно удалить эти раздилители в виде черточек и запихнуть все новости в список
Моменты, которые можно улучшить:
|
No description provided.