Python
1
Вклад в тег
import requests
from bs4 import BeautifulSoup
import csv
headers = {
'accept': '*/*',
'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Mobile Safari/537.36'
}
url = 'https://www.qoo10.sg/s/EYELASH?keyword=eyelash&keyword_auto_change=&curPage=5'
def get_html(base_url, headers):
request = requests.get(url, headers=headers)
if request.status_code == 200:
print('OK')
else:
print('ERROR')
return print(request.status_code)
get_html(url, headers)