I check about 30 websites every day, so I wrote a script to operate them from the terminal.
People who always see only about 10 pages on the same page
- Bookmark to a folder
# coding: utf-8
import webbrowser
LINES_NUM = 2
urls = """
https://www.google.co.jp/
https://github.com/
qiita.com
"""
urls = [url for url in urls.split("\n") if url]
for i, url in enumerate(urls, 1):
# correct url
if not url.startswith("http"):
url = "http://" + url
webbrowser.open_new_tab(url)
# stop each line by standard input
if i % LINES_NUM == 0:
raw_input("type something >> ")
Thank you for fixing it in the comment section. M (_) m
[Type something >>] will be displayed like this, so if you press Enter appropriately, the next specified line (LINES_NUM = 2) will be read.
Delete blank line: [Delete empty element from list](http://haru.moo.jp/2015/07/%E3%83%AA%E3%82%B9%E3%83%88%E3% 81% 8B% E3% 82% 89% E7% A9% BA% E3% 81% AE% E8% A6% 81% E7% B4% A0% E3% 82% 92% E5% 89% 8A% E9% 99% A4% E3% 81% 99% E3% 82% 8B /)
Recommended Posts