0
웹 포털에있는 CSV 파일을 수동으로 다운로드 할 때 URL에 로그인하여 CSV 다운로드 버튼을 클릭하면 저장하라는 메시지가 표시됩니다. 우리는 python3을 사용하고 있습니다URL에서 CSV 파일 가져 오기
나는이 스크립트를 실행할 때 파이썬 스크립팅을 통해이 작업을 시도하고 있습니다. Download CSV
이라는 이름의 html 페이지를 얻습니다.이를 통해 csv 파일을 얻습니다.
import urllib.request
import requests
session = requests.session()
playload = {'j_username':'avinash.reddy', 'j_password':'password'}
r = session.post('https://url_of_the_portal/auth/login','data=playload')
r = session.get('URL_of_the_page_where_the_csv_file_exiests')
url='https://url_of_the_portal/review/download/bm_sis'
print ('done')
urllib.request.urlretrieve (url, "Download CSV")