def open_urls(self): """ Open the URLs contained on the focused tweets in a browser. """ status = self.timelines.active_status urls = get_urls(status.text) if not urls: self.info_message(_('No URLs found on this tweet')) return self.open_urls_in_browser(urls)
def open_urls(self): """ Open the URLs contained on the focused tweets in a browser. """ status = self.timelines.get_active_status() if status is None: return urls = get_urls(status.text) if not urls: self.info_message(_('No URLs found on this tweet')) return args = ' '.join(urls) command = self.configuration.browser if not command: self.error_message(_('You have to set the BROWSER environment variable to open URLs')) return try: spawn_process(command, args) except: self.error_message(_('Unable to launch the browser'))