我遇到一個網站,一進入就會prompt,提醒需要輸入帳密,
我可以用selenium連上 https://username:[email protected],
並取得我想要爬取的資料
但selenium實在太慢了,所以我想回歸原本使用requests+lxml,
卻無法使用 https://username:[email protected] 的方式登入,
會一直引發ConnectionError(err, request=request)
我想試著用requests.get(url,auth=(username,password))
也一樣會引發ConnectionError
想請問像這類的網站是否可直接利用requests登入?
謝謝