我正在嘗試從需要使用 go 的用戶/密碼登錄的網站抓取數據。使用 python,使用requestslib很簡單: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 完成同樣事情的簡單方法是什么?謝謝。
- 2 回答
- 0 關注
- 283 瀏覽
添加回答
舉報
0/150
提交
取消