pythonでちょっとしたブックマーク機能のプログラムを組みました。
import webbrowser
print('Bookmark List')
print('1:google')
print('2:yahoo')
print('3:buhidoh')
print('4:teratail')
print('5:garunimo')
print('6:manga')
print('7:youtube')
bookmark = input('bookmark:')
if bookmark == '1':
url = 'http://www.google.co.jp/' webbrowser.open(url)
elif bookmark == '2':
url = 'http://www.yahoo.co.jp/'
webbrowser.open(url)
elif bookmark == '3':
url = 'http://www.buhidoh.net/'
webbrowser.open(url)
elif bookmark == '4':
url = 'http://www.teratail.com/users/berry/Reply'
webbrowser.open(url)
elif bookmark == '5':
url = 'http://www.garunimo.com/'
webbrowser.open(url)
elif bookmark == '6':
url = 'http://www.mangamatome.net'
webbrowser.open(url)
elif bookmark == '7':
url = 'http://youtube.co.jp'
webbrowser.open(url)
else:
print('bookmarkにありません')
といったものです。結果はちゃんと機能します。しかし、terminalに
(process:10320): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
@chrome://browser/content/content.js:44:5
addTab@chrome://browser/content/tabbrowser.xml:1803:15
loadOneTab@chrome://browser/content/tabbrowser.xml:1413:23
nsBrowserAccess.prototype._openURIInNewTab@chrome://browser/content/browser.js:15680:15
nsBrowserAccess.prototype.openURI@chrome://browser/content/browser.js:15753:23
handURIToExistingBrowser@jar:file:///usr/lib/firefox/browser/omni.ja!/components/nsBrowserContentHandler.js:697:1
dch_handle@jar:file:///usr/lib/firefox/browser/omni.ja!/components/nsBrowserContentHandler.js:825:11
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
_loadURIWithFlags@chrome://browser/content/browser.js:12079:7
loadURIWithFlags@chrome://browser/content/tabbrowser.xml:6090:13
addTab@chrome://browser/content/tabbrowser.xml:1858:17
loadOneTab@chrome://browser/content/tabbrowser.xml:1413:23
nsBrowserAccess.prototype._openURIInNewTab@chrome://browser/content/browser.js:15680:15
nsBrowserAccess.prototype.openURI@chrome://browser/content/browser.js:15753:23
handURIToExistingBrowser@jar:file:///usr/lib/firefox/browser/omni.ja!/components/nsBrowserContentHandler.js:697:1
dch_handle@jar:file:///usr/lib/firefox/browser/omni.ja!/components/nsBrowserContentHandler.js:825:11
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
TabsProgressListener.onStateChange@chrome://browser/content/browser.js:15551:9
callListeners@chrome://browser/content/tabbrowser.xml:538:24
_callProgressListeners@chrome://browser/content/tabbrowser.xml:559:13
mTabProgressListener/<._callProgressListeners@chrome://browser/content/tabbrowser.xml:596:22
mTabProgressListener/<.onStateChange@chrome://browser/content/tabbrowser.xml:752:1
t.O<@https://www.google.com/js/bg/9LOvvS8UixhmLw-NHg4R4bm77aHKTafT_BPUICERNo0.js line 1 > eval:1:5279
D.prototype.H@https://www.google.com/js/bg/9LOvvS8UixhmLw-NHg4R4bm77aHKTafT_BPUICERNo0.js line 1 > eval:1:8952
D@https://www.google.com/js/bg/9LOvvS8UixhmLw-NHg4R4bm77aHKTafT_BPUICERNo0.js line 1 > eval:1:2028
g.si/<@https://s.ytimg.com/yts/jsbin/www-en_US-vflp5gyXL/common.js:30:47
Ha/<@https://s.ytimg.com/yts/jsbin/spf-vflbit-XM/spf.js:14:477
u@https://s.ytimg.com/yts/jsbin/spf-vflbit-XM/spf.js:7:721
Ha@https://s.ytimg.com/yts/jsbin/spf-vflbit-XM/spf.js:14:441
Ua@https://s.ytimg.com/yts/jsbin/spf-vflbit-XM/spf.js:17:285
l/<@https://s.ytimg.com/yts/jsbin/spf-vflbit-XM/spf.js:7:132
といったものが表示されます。これは、一体どういういみなのでしょうか?
解答のほどよろしくおねがいします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。