我想从此页面https://www.stenaline.pl/book#booking/SailingsFaresByTripType抓取价格(提交后显示)。实际上,我是通过Selenium完成的。现在,我尝试对请求执行此操作,但响应中没有任何有趣的内容。我怎样才能做到这一点?
from requests import Session
import json
from bs4 import BeautifulSoup
import lxml
session = Session()
session.head('https://www.stenaline.pl/do-szwecji')
data = '''
{"ReservationCode":null,"OriginalSalesChannelCode":"PIB","OneWay":true,"IsAmendment":false,"IsAmendmentAllowed":true,"IsPayReservationOnly":false,"IsUpgrade":false,"UpgradeProductCode":null,"ActivePage":null,"ActiveStep":"SailingsFaresByTripType","CurrentAction":"InitSailings","ItemToInject":null,"PartyCompStorageStr":"passengers%3dADULT%3a1%26vehicles%3dCAR470200%3a1","DateStorageStr":"depDateOut%3d2019-03-02","RouteStorageStr":"routeOut%3dGDKA","IsPreloadEvent":false,"LegsForCurrentAction":["Out"],"CmsContext":{"FindAndBookType":"destPage","DestinationPageName":"do-szwecji","DestinationPageId":"{D9EF15FD-71F5-4E87-8EEF-0F4B42485712}","OfferCode":"","OfferCodeSecurityId":"","OfferCodeValidated":true,"OfferCodeIsValid":true,"UseContractRate":false,"SelectedRoute":"GDKA","SelectedDate":null,"TripType":"Efp","DefaultTripType":"Efp","IsResponsive":false,"QueryStringParams":null,"ProductCode":"","DayMonthView":"day","MandatoryVehicle":false,"ProductInfoByTripType":{"Efp":{"ProductCode":"","MandatoryVehicle":false,"IsOneWay":false,"IsOfferCodeAllowed":true,"DayMonthView":"day"}},"PrepopulationData":null,"UsageModeStr":"Anonymous","AgentIsBusinessCustomer":false,"AgentIsVatCustomer":false,"ReservationCode":null,"TravelAgentID":null,"AgentContact":null,"OlpId":null,"OriginalTripType":null,"StepName":"CmsContext","TraceStepName":"Cms","ShouldUpdateSelf":true},"BookingContext":{"OriginalUrl":null,"CurrencyCode":"PLN","SalesOwnerId":"16","SloopLanguageCode":"pl","CmsLanguageCode":"pl-PL","Locale":"pl-PL","SelectedCreditCardType":null,"TotalPrice":null,"DefaultZeroPrice":"0 zł","SupressDecimals":true},"IsProdEnvironment":true,"TripTypeWithPreloadedSailings":null,"RouteDateByTripType":{"Efp":{"Legs":{"Out":{"RouteCode":"GDKA","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":"day","Day":"02","ShortDate":"2019-03-02","FullDate":"Sat 02 Mar 2019","IsoDate":"2019-03-02","Month":"03","Weekday":"Sat","YearMonth":"2019-03","Year":"2019","EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"RouteCode":"KAGD","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":"day","Day":"02","ShortDate":"2019-03-02","FullDate":"Sat 02 Mar 2019","IsoDate":"2019-03-02","Month":"03","Weekday":"Sat","YearMonth":"2019-03","Year":"2019","EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Home"}},"LegsToUpdate":["Out","Home"],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false},"Cruise":{"Legs":{"Out":{"RouteCode":"GDKA","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"RouteCode":"KAGD","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Home"}},"LegsToUpdate":["Out","Home"],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false},"Daytrip":{"Legs":{"Out":{"RouteCode":"GDKA","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"RouteCode":"KAGD","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Home"}},"LegsToUpdate":["Out","Home"],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false},"SpecialOffer":{"Legs":{"Out":{"RouteCode":"GDKA","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"RouteCode":"KAGD","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Home"}},"LegsToUpdate":["Out","Home"],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false},"Transfer":{"Legs":{"Out":{"RouteCode":null,"RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":false,"LegName":"Out"},"Home":{"RouteCode":null,"RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":null,"Day":null,"ShortDate":null,"FullDate":null,"IsoDate":null,"Month":null,"Weekday":null,"YearMonth":null,"Year":null,"EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":false,"LegName":"Home"}},"LegsToUpdate":[],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false}},"PreviousDepartureIdOut":null,"PreviousProductCodeOut":null,"PreviousDepartureIdHome":null,"PreviousProductCodeHome":null,"PreviousProductOut":null,"PreviousProductHome":null,"PreviousCabinsOut":null,"PreviousCabinsHome":null,"PreviousCabinsArrangementsOut":null,"PreviousCabinsArrangementsHome":null,"PreviousThirdPartyArrangements":null,"PreviousOnboardExtraOut":null,"PreviousOnboardExtraHome":null,"TraceList":null,"BookingDeviceCode":"desktop","BookingSteps":{"TripType":"Efp","PassengersVehiclesByTripType":{"Daytrip":{"Legs":{"Out":{"SelectedVehicle":{"GeneralGenericID":null,"Type":null,"Description":null,"BookMultiple":false,"NoOf":0,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"footPassengerCode"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":9,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"SelectedVehicle":{"GeneralGenericID":null,"Type":null,"Description":null,"BookMultiple":false,"NoOf":0,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"footPassengerCode"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":9,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Home"}},"IsDifferentPartySize":false,"LegsToUpdate":["Out","Home"],"StepName":"PassengersVehiclesByTripType","TraceStepName":"PassVeh","ShouldUpdateSelf":false},"Cruise":{"Legs":{"Out":{"SelectedVehicle":{"GeneralGenericID":null,"Type":null,"Description":null,"BookMultiple":false,"NoOf":0,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"footPassengerCode"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":19,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"SelectedVehicle":{"GeneralGenericID":null,"Type":null,"Description":null,"BookMultiple":false,"NoOf":0,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"footPassengerCode"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":19,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Home"}},"IsDifferentPartySize":false,"LegsToUpdate":["Out","Home"],"StepName":"PassengersVehiclesByTripType","TraceStepName":"PassVeh","ShouldUpdateSelf":false},"Efp":{"Legs":{"Out":{"SelectedVehicle":{"GeneralGenericID":"F2D0B131-2DD6-4BF8-A3FA-19CC19D7A1E4","Type":"CAR470200","Description":"samochód wys.2m*, dł.4,7m","BookMultiple":true,"NoOf":1,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"CAR"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":19,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"SelectedVehicle":{"GeneralGenericID":"F2D0B131-2DD6-4BF8-A3FA-19CC19D7A1E4","Type":"CAR470200","Description":"samochód wys.2m*, dł.4,7m","BookMultiple":true,"NoOf":1,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"CAR"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":19,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Home"}},"IsDifferentPartySize":false,"LegsToUpdate":["Out","Home"],"StepName":"PassengersVehiclesByTripType","TraceStepName":"PassVeh","ShouldUpdateSelf":false,"OneWay":true},"SpecialOffer":{"Legs":{"Out":{"SelectedVehicle":{"GeneralGenericID":"F2D0B131-2DD6-4BF8-A3FA-19CC19D7A1E4","Type":"CAR470200","Description":"samochód wys.2m*, dł.4,7m","BookMultiple":true,"NoOf":1,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"CAR"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":19,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"SelectedVehicle":{"GeneralGenericID":"F2D0B131-2DD6-4BF8-A3FA-19CC19D7A1E4","Type":"CAR470200","Description":"samochód wys.2m*, dł.4,7m","BookMultiple":true,"NoOf":1,"MaxNo":9,"MandatoryRegNo":false,"Mandatory":false,"Callout":false,"IsVatVehicle":false,"VirtualGroup":"CAR"},"SelectedTrailer":null,"CustomerCategories":[{"Code":"ADULT","AgeFrom":16,"AgeTo":null,"Description":"An adult is older than or equal to 16 years.","NamePlural":"dorosłych","NameSingular":"dorosły","InfoLabel":"dorosłych (16 lat lub więcej)","AgeSpan":"16 lat lub więcej","NoOf":1,"GenericID":"866B4D8A-8B67-48BF-85CC-BB72C019683C","Mandatory":false,"MaxNo":19,"AmendmentStatus":0}],"ShouldUpdateSelf":true,"LegName":"Home"}},"IsDifferentPartySize":false,"LegsToUpdate":["Out","Home"],"StepName":"PassengersVehiclesByTripType","TraceStepName":"PassVeh","ShouldUpdateSelf":false}},"SailingsFaresByTripType":{"Efp":{"OneWay":true,"IsRoundTrip":false,"Legs":{"Out":{"Product":{"DepartureId":null,"Code":null,"ProductElementId":null,"CategoryCodeStr":null,"LeadVehicleResRule":null,"TrailerVehicleResRule":null,"VehicleTrailerCombinationResRule":null,"Version":0,"MandatoryCabin":null,"IncludedItems":null,"PassengerCCRRs":null,"AllowExtras":null,"FerryTrpElements":null,"AccommodationElements":null,"TransferElements":null,"TpaElements":null,"IsAmendmentAllowed":false,"Description":null,"UniqueCellId":null,"MandatoryCabinNotIncludedInPrice":false,"LegName":"Out"},"PreferredTime":null,"PreferredProduct":null,"AlternateRouteTo":null,"DepartureId":null,"DepartureFerryVersion":0,"FerryCode":null,"FerryName":null,"FerryCalloutReadMoreUrl":null,"DepartureInfos":null,"RouteCode":null,"RouteName":null,"RouteNameEN":null,"RouteTimeZoneAdjustment":0,"DepartureFerryPassengerVersion":0,"VehicleTrailerCombinationGenericId":null,"DepFerryVehicleVersion":null,"DepartureDateStr":null,"DepartureTimeStr":null,"ArrivalDateStr":null,"ArrivalTimeStr":null,"LeadVehicleGenericId":null,"TrailerVehicleGenericId":null,"MandatoryGuestList":false,"IsDepartureTimePassed":false,"ShouldUpdateSelf":true,"LegName":"Out"}},"LegsToUpdate":[],"StepName":"SailingsFaresByTripType","TraceStepName":"Sailing","ShouldUpdateSelf":true,"routeDate":{"Legs":{"Out":{"RouteCode":"GDKA","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":"day","Day":"02","ShortDate":"2019-03-02","FullDate":"Sat 02 Mar 2019","IsoDate":"2019-03-02","Month":"03","Weekday":"Sat","YearMonth":"2019-03","Year":"2019","EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"RouteCode":"KAGD","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":"day","Day":"02","ShortDate":"2019-03-02","FullDate":"Sat 02 Mar 2019","IsoDate":"2019-03-02","Month":"03","Weekday":"Sat","YearMonth":"2019-03","Year":"2019","EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Home"}},"LegsToUpdate":["Out","Home"],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false},"currencyCode":"PLN"},"SpecialOffer":{"OneWay":true,"IsRoundTrip":false,"Legs":{"Out":{"Product":{"DepartureId":null,"Code":null,"ProductElementId":null,"CategoryCodeStr":null,"LeadVehicleResRule":null,"TrailerVehicleResRule":null,"VehicleTrailerCombinationResRule":null,"Version":0,"MandatoryCabin":null,"IncludedItems":null,"PassengerCCRRs":null,"AllowExtras":null,"FerryTrpElements":null,"AccommodationElements":null,"TransferElements":null,"TpaElements":null,"IsAmendmentAllowed":false,"Description":null,"UniqueCellId":null,"MandatoryCabinNotIncludedInPrice":false,"LegName":"Out"},"PreferredTime":null,"PreferredProduct":null,"AlternateRouteTo":null,"DepartureId":null,"DepartureFerryVersion":0,"FerryCode":null,"FerryName":null,"FerryCalloutReadMoreUrl":null,"DepartureInfos":null,"RouteCode":null,"RouteName":null,"RouteNameEN":null,"RouteTimeZoneAdjustment":0,"DepartureFerryPassengerVersion":0,"VehicleTrailerCombinationGenericId":null,"DepFerryVehicleVersion":null,"DepartureDateStr":null,"DepartureTimeStr":null,"ArrivalDateStr":null,"ArrivalTimeStr":null,"LeadVehicleGenericId":null,"TrailerVehicleGenericId":null,"MandatoryGuestList":false,"IsDepartureTimePassed":false,"ShouldUpdateSelf":true,"LegName":"Out"}},"LegsToUpdate":[],"StepName":"SailingsFaresByTripType","TraceStepName":"Sailing","ShouldUpdateSelf":true,"routeDate":{"Legs":{"Out":{"RouteCode":"GDKA","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":"day","Day":"02","ShortDate":"2019-03-02","FullDate":"Sat 02 Mar 2019","IsoDate":"2019-03-02","Month":"03","Weekday":"Sat","YearMonth":"2019-03","Year":"2019","EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Out"},"Home":{"RouteCode":"KAGD","RouteName":null,"TransferRouteCodeToFerry":null,"TransferRouteCodeFromFerry":null,"DestinationDescriptionTextToFerry":null,"DestinationDescriptionTextFromFerry":null,"OpenTransferDepartureIdToFerry":null,"OpenTransferDepartureIdFromFerry":null,"DayMonthView":"day","Day":"02","ShortDate":"2019-03-02","FullDate":"Sat 02 Mar 2019","IsoDate":"2019-03-02","Month":"03","Weekday":"Sat","YearMonth":"2019-03","Year":"2019","EarliestSearchDate":null,"EarliestSearchTime":null,"LatestSearchDate":null,"LatestSearchTime":null,"ShouldUpdateSelf":true,"LegName":"Home"}},"LegsToUpdate":["Out","Home"],"StepName":"RouteDateByTripType","TraceStepName":"Route","ShouldUpdateSelf":false},"currencyCode":"PLN"}},"LowFaresByTripType":{},"OnboardExtra":{"Legs":{"Out":{"PreferredArr":null,"OnboardExtrasGroups":[],"ShouldUpdateSelf":true,"LegName":"Out"}},"IsDifferentPartySize":false,"LegsToUpdate":["Out"],"StepName":"OnboardExtra","TraceStepName":"Onboard","ShouldUpdateSelf":true,"OneWay":true,"routeCode":"GDKA","outwardHeader":"Wyjazd","currencyCode":"PLN"},"VehicleDetails":null,"PassengerDetails":{"ShowAcceptMailOffers":false,"ShowAcceptSmsOffers":false,"Legs":{"Out":{"Guests":[],"ShouldUpdateSelf":true,"LegName":"Out"}},"PayingCustomer":{"Title":null,"FirstName":null,"Surname":null,"Address1":null,"Address2":null,"City":null,"PostalCode":null,"Country":"POL","PhoneMobilePrefix":"0048","PhoneMobile":null,"PhoneSms":null,"PhoneSmsPrefix":null,"PhoneHomePrefix":"0048","PhoneHome":null,"Email":null,"LoyaltyNumberShort":null,"AcceptDigitalSignupExtra":false,"AcceptMailOffersSignup":false,"AcceptSmsOffersSignup":false,"AllowDisturbanceSms":false,"AcceptDigitalUpdate":false,"AcceptMailOffers":false,"AcceptSmsOffers":false,"AcceptDigitalUpgradeExtra":false,"AcceptMailOffersUpgrade":false,"AcceptSmsOffersUpgrade":false,"Gender":null,"SalesOwnerCountryCode":null,"WebCustomerId":null,"StaffMember":false,"StaffMemberId":null,"BuildingNo":null,"DateOfBirth":null},"DifferentGuestListOnHome":false,"ExtraMemberNotTravelling":false,"RemoveArrangementsForExtraMemberNotTravelling":false,"UpdateProfile":false,"SignupExtraMember":false,"LegsToUpdate":[],"StepName":"PassengerDetails","TraceStepName":"PassDet","IsCabinDistributionValid":false,"ShouldUpdateSelf":true},"Cabins":{"Legs":{"Out":{"Cabins":[],"CabinFoldedOut":null,"PreferredCabin":null,"CabinMapCategory":null,"ShouldUpdateSelf":true,"LegName":"Out"}},"LegsToUpdate":["Out"],"StepName":"Cabins","TraceStepName":"Cabin","ShouldUpdateSelf":true,"OneWay":true,"routeCode":"GDKA","ShowOut":false,"CopyCabinHasBeenShown":false},"DestinationDeals":{"Arrangements":[],"StepName":"DestinationDeals","Preferred":null,"TraceStepName":"DestDeal","ShouldUpdateSelf":true,"OneWay":true,"routeCode":"GDKA"},"PaymentDetails":{"OriginalUpSelling":{"ValidationMessages":[],"Sailings":{},"Cabins":{},"OnboardExtra":{},"ReservationCode":null},"UpSelling":{"ValidationMessages":[],"Sailings":{},"Cabins":{},"OnboardExtra":{},"ReservationCode":null},"BankAccountNumber":null,"BankID":null,"CancellationInsuranceSelected":null,"ReceiveSms":null,"ReceiveSmsPreviousVersion":false,"CustomerId":0,"ExtraPointsPartPayment":false,"PartPayments":[],"PaymentErrorCode":0,"PaymentMethod":{"Code":null,"PaymentType":{"Code":null},"IsDepositPayment":false,"AmendmentPaymentType":null,"Deposit":null},"PaymentPayPlanOption":null,"SocialSecurityNumber":null,"ExternalInsuranceProducts":[],"AutoRemovedExternalInsuranceProducts":[],"StepName":"PaymentDetails","TraceStepName":"PayDet","IsTescoEnabled":false,"IsGiftCardsEnabled":false,"Voucher":{"Amount":0,"AmountString":null,"AmountLeftString":null,"Code":null,"CurrencyCode":null,"Id":null,"State":"unknown","ValidationErrorDescription":null,"Value":0,"ValueString":null},"ShouldUpdateSelf":true}},"PriceSpecification":{"BalanceToPay":null,"TotalBalance":null,"Paid":null,"TotalPrice":null,"Commission":null,"Fee":null,"IsVatReservation":false,"HasVatPriceItem":false,"HasEuPackageClassificationCode":false,"EuPackageClassificationCode":null,"PriceSpecificationItems":null,"StepName":"PriceSpecification","TraceStepName":"Price","ShouldUpdateSelf":false},"SupportsLocalStorage":false,"FetchSailingsAtLoad":true,"AssemblyVersion":"6.9.0.0","TimeStamp":0,"IsAuthenticated":false,"HiddenTripTypes":["SpecialOffer","FerryAccommodation","Cruise","Daytrip","Transfer"],"PaymentReturnUrl":null,"TripType":"Efp","FindAndBookTripTypes":["Daytrip","Cruise","Efp","SpecialOffer"],"StepsToUpdate":null,"SupportsSessionStorage":true,"inSync":false}
'''
response = session.post(
url='https://www.stenaline.pl/book/JsonSessionLess/BookingModel',
data={
'model':json.loads(data),
'method': 'PUT'
},
headers = {
'authority': 'www.stenaline.pl',
'method': 'POST',
'path': '/book/JsonSessionLess/BookingModel',
'scheme': 'https',
'accept': 'application/json, text/javascript, */*; q=0.01',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7',
'content-length': '33720',
'content-type': 'application/x-www-form-urlencoded',
'cookie': 'ASP.NET_SessionId=e2byx5f2dp2qkalj2f43pi1e; SC_ANALYTICS_GLOBAL_COOKIE=f2ef9267f26240d6b1ed87b2c005efa6|False; IsContentPage=true; _ga=GA1.2.817422982.1550602463; OPTOUTMULTI=0:0%7Cc9:0%7Cc11:0%7Cc10:0; _fbp=fb.1.1550602464105.1997228471; yieldify_original_referrer=https%3A//www.google.pl/; yieldify_stc=1; yieldify_st=1; yieldify_sale_ts=1550602464448; yieldify_iv=1; _y2=1%3AeyJjIjp7IjEwNDU1OSI6LTE0NzM5ODQwMDAsIm8iOi0xNDczOTg0MDAwfX0%3D%3ALTE0NzEzNjMxNjg%3D%3A99; sc.ASP.NET_SESSIONID=kuqqgc0ticj0bupmyg2uwfjr; preferreddest={D9EF15FD-71F5-4E87-8EEF-0F4B42485712}; sc.UserId=cf6acc47-6199-4c8c-8484-84a00f9c40ce; findAndBook_one-way_return=true; _gcl_aw=GCL.1550930353.~Cj0KCQiA-8PjBRCWARIsADc18TJjTMiJwb77Z1Z6HQS8KUYaq24IWZEF33N7uELeDy1K5Af9PO2cCpwaAq-tEALw_wcB; _gcl_dc=GCL.1550930353.Cj0KCQiA-8PjBRCWARIsADc18TJjTMiJwb77Z1Z6HQS8KUYaq24IWZEF33N7uELeDy1K5Af9PO2cCpwaAq-tEALw_wcB; _gac_UA-60614033-1=1.1550930370.Cj0KCQiA-8PjBRCWARIsADc18TJjTMiJwb77Z1Z6HQS8KUYaq24IWZEF33N7uELeDy1K5Af9PO2cCpwaAq-tEALw_wcB; X-SR-ID=7c02a3dcec83649d00f1732c77a7abc977264f2a99d1e5f27c1f7a9bb9506b3bc2cd5642; _gid=GA1.2.2029524038.1551516347; AMCVS_F0873FE55BF6B43B0A495DE7%40AdobeOrg=1; AMCV_F0873FE55BF6B43B0A495DE7%40AdobeOrg=1278862251%7CMCIDTS%7C17958%7CMCMID%7C07349589611171338273328513558977993099%7CMCAAMLH-1552121149%7C6%7CMCAAMB-1552121149%7CRKhpRz8krg2tLO6pguXWp5olkAcUniQYPHaMWWgdJ3xzPWQmdj0y%7CMCCIDH%7C1774894710%7CMCOPTOUT-1551523549s%7CNONE%7CvVersion%7C4.0.0; s_cc=true; yieldify_visit=1; yieldify_location=%257B%2522country%2522%253A%2522Poland%2522%252C%2522region%2522%253A%2522Mazovia%2522%252C%2522city%2522%253A%2522Radom%2522%257D; s_sq=%5B%5BB%5D%5D; utag_main=v_id:0169071be6b9001ce73691e6b9b804082001907a0086e$_sn:3$_ss:0$_st:1551518163321$_cpn:2$previouspage:%2Fdo-szwecji$tealiumEnvironment:prod$ses_id:1551516349438%3Bexp-session$_pn:2%3Bexp-session; _y1sp_id.a447=3066ddb2-ded0-41c3-bf2b-61e004503b3f.1550602464.3.1551516364.1550938626.3c5c7ec7-318a-4c47-b269-172a62ba6ec2; _yi=1%3AeyJsaSI6bnVsbCwic2UiOnsiYyI6MywibGEiOjE1NTE1MTk1MzY3ODQsInAiOjIsInNjIjoyMTAxfSwidSI6eyJpZCI6IjBhNDcxMDA3LWQ5ZjgtNDhhNC04N2JkLWJmOGJjMzU2NmI0OCIsImZsIjoiMCJ9fQ%3D%3D%3ALTE5NjU3ODQwMA%3D%3D%3A99; yieldify_ujt=22905',
'origin': 'https://www.stenaline.pl',
'referer': 'https://www.stenaline.pl/book',
'user-agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.79',
'webbook-step-action': 'Priv/New/SailingsEfp-InitSailings',
'x-http-method-override': 'PUT',
'x-requested-with': 'XMLHttpRequest'
}
)
print(response)
答案 0 :(得分:0)
在response.text
下可以找到您的抓取数据,打印response
只会显示状态代码。在此处查看文档:{{3}}