29 lines
842 B
Python
29 lines
842 B
Python
import requests, sys, bs4, urllib, locale
|
|
|
|
term = sys.argv[1]
|
|
|
|
url = "https://www.starbill.co.kr/comp/starbill/bidList.do"
|
|
|
|
data = {
|
|
"pageIndex": 1,
|
|
"bidDiv": 1,
|
|
"searchCondition": "title",
|
|
"searchKeyword": term
|
|
}
|
|
|
|
headers = {
|
|
"Accept": "text/html, application/xhtml+xml, image/jxr, */*",
|
|
"Accept-Encoding": "gzip, deflate",
|
|
"Accept-Language": "ko",
|
|
"Connection": "Keep-Alive",
|
|
"Cookie": "JSESSIONID=33E5B26D4F4D7A9F93CC3F20914D4083; compNum=; _ga=GA1.3.1852339941.1633070307; _gid=GA1.3.1739891785.1633070307",
|
|
"Host": "www.starbill.co.kr",
|
|
"Referer": "https://www.starbill.co.kr/comp/main.do",
|
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
|
|
}
|
|
|
|
resp = requests.post(url, params=data, headers=headers)
|
|
resp.raise_for_status()
|
|
html = resp.text
|
|
|
|
print(html) |