我正在嘗試從需要使用 go 的用戶/密碼登錄的網(wǎng)站抓取數(shù)據(jù)。使用 python,使用requestslib很簡(jiǎn)單:import requestssession = requests.Session()session.post("https://site.com/login", data={ 'username': 'user', 'password': '123456' })# access URL that requires authenticationresp = session.get('https://site.com/restricted/url')用 golang 完成同樣事情的簡(jiǎn)單方法是什么?謝謝。
- 2 回答
- 0 關(guān)注
- 284 瀏覽
添加回答
舉報(bào)
0/150
提交
取消