File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,13 @@ export default class ScriptView extends MessagePanelView {
173173 line = _ . escape ( line ) ;
174174 }
175175
176- line = this . ansiFilter . toHtml ( line ) ;
176+ try {
177+ line = this . ansiFilter . toHtml ( line ) ;
178+ } catch ( e ) {
179+ // TODO why this happens https://github.com/atom-community/atom-script/issues/2358
180+ console . error ( e ) ;
181+ }
182+
177183 line = linkPaths ( line ) ;
178184
179185 const { clientHeight, scrollTop, scrollHeight } = this . body [ 0 ] ;
Original file line number Diff line number Diff line change 1+ # See the console after running this
2+
3+ import requests
4+
5+ head = {'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36' }
6+
7+ r = requests .get ('https://www.oxfordlearnersdictionaries.com/us/wordlists/oxford3000-5000' , headers = head )
8+
9+ print (r .text )
You can’t perform that action at this time.
0 commit comments