In terminal.app, install ffmpeg through homebrew
brew install ffmpeg
Validate the installation:
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Screen Recording with WebRTC</title> | |
</head> | |
<body> | |
<h1>Screen Recording Example</h1> | |
<button id="startBtn">Start Recording</button> | |
<button id="stopBtn" disabled>Stop Recording</button> | |
<button id="downloadBtn" disabled>Download Video</button> |
browser.LoadingStateChanged += OnLoadingStateChanged; | |
//A slightly more complicated example | |
private void OnLoadingStateChanged(object sender, LoadingStateChangedEventArgs args) | |
{ | |
//Wait for the Page to finish loading | |
if (args.IsLoading == false) | |
{ | |
const string script = @"(function() | |
{ |
using System; | |
using System.IO; | |
using System.Threading.Tasks; | |
using System.Net.Http; | |
namespace Example | |
{ | |
public interface IImageDownloader | |
{ | |
Task DownloadImageAsync(string directoryPath, string fileName, Uri uri); |
{ | |
"title": "Takeout API", | |
"discoveryVersion": "v1", | |
"ownerName": "Google", | |
"version_module": true, | |
"resources": { | |
"exports": { | |
"methods": { | |
"get": { | |
"flatPath": "v2/{service}/exports/{exportId}", |
#region License | |
// ----------------------------------------------------------------------------------------------------------- | |
// | |
// File: Network.cs | |
// | |
// Copyright (c) 2019 - 2019 VisualPlus <https://darkbyte7.github.io/VisualPlus/> | |
// All Rights Reserved. | |
// | |
// ------------------------------------------------------------------------------------------------------------- |
(?:(?:\+?([1-9]|[0-9][0-9]|[0-9][0-9][0-9])\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([0-9][1-9]|[0-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))? | |
/a tweaked version of the second regex in the question here to allow for all country codes and leading zeros in area codes: https://stackoverflow.com/questions/3868753/find-phone-numbers-in-python-script |
//http://jordonmeyer.com/text-list-of-us-cities/ | |
Aberdeen | |
Abilene | |
Akron | |
Albany | |
Albuquerque | |
Alexandria | |
Allentown | |
Amarillo |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json.Linq; | |
using YoutubeExplode; | |
using YoutubeExplode.Models; |
https://stackoverflow.com/questions/3042757/downloading-a-picture-via-urllib-and-python | |
This gist: use https://docs.python.org/2/library/urllib.html | |
import urllib | |
urllib.urlretrieve("http://www.gunnerkrigg.com//comics/00000001.jpg", "00000001.jpg") |