mardi 18 août 2020

Sending data fields through request.post

from bs4 import BeautifulSoup as bs

from urllib.request import urlopen

import requests

urls1="https://ift.tt/3gen89i"

data={'checkin': '08152020',

'city': 'CTGOI',

'checkout': '08162020',

'roomStayQualifier': '2e0e',

'locusId': 'CTGOI',

'country': 'IN',

'locusType': 'city',

'searchText': 'Goa, India',

'visitorId': '5c68c2fb-0551-4ef2-8dae-1a55bb744e66'

}

req=requests.post(urls1,data, headers={'User-Agent': 'XYZ/3.0'})

page_soup = bs(req.content,"html.parser")

enter code here

print(page_soup)




Aucun commentaire:

Enregistrer un commentaire