This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import random | |
from pathlib import Path | |
from playwright.async_api import BrowserContext, async_playwright | |
CWD = Path().resolve() | |
# Example path | |
user_data_dir = Path.joinpath(CWD, 'playwright/data_dir/chromium') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void test(){ | |
try { | |
String path = "/"; | |
String host = "publicobject.com"; | |
int port = 80; | |
Socket socket = new Socket(InetAddress.getByName(host),port,InetAddress.getByName("172.16.1.251"),39981); | |
socket.setKeepAlive(false); | |
OutputStreamWriter osw = new OutputStreamWriter(socket.getOutputStream(),"utf-8"); | |
osw.write("GET " + path + " HTTP/1.0\r\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create by Yale 2019/3/29 9:43 | |
package httpclient | |
import ( | |
"net" | |
"net/http" | |
"time" | |
) | |
func GetLocalAddrHttpClient(localIp net.IP, localPort int) *http.Client { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[] |