2024年1月17日 星期三

爬船-post

 

import requests
from bs4 import BeautifulSoup
import json
header ={
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64)************
    'Content-Type':'application/x-www-form-urlencoded'}

# 設定 Cookie

cookies = {'Cookie':'ASP.NET_SessionId=22gn3t1if**********; Hm_lvt_adc1d4b64be*******'}
                                                                                       
response = requests.post('https://www.shipxy.com/ship/GetShip',data={'mmsi':'413360000'},
                        headers=header,
                        cookies=cookies)

data = response.json()
print(data)
------------------------------------------------
{'status': 0, 'data': [{'source': 0, 'mmsi': '413360000',
'shipid': '6B902992B7FABD9C', 'tradetype': 1, 'type': 70, 'imo': '9488217',
'name': 'WU YI HAI', 'matchtype': 1, 'cnname': '武夷海', 'callsign': 'BQCF',
'length': 1900, 'width': 320, 'left': 160, 'trail': 300, 'draught': 11500,
'dest': 'ALGECIRAS,ES', 'eta': '01-22 12:00', 'laststa': 1705154680, 'lon': -75554317,
'lat': 36853085, 'sog': 4681, 'cog': 7730, 'hdg': 7800, 'rot': 0,
'navistatus': 0, 'lastdyn': 1704795863, 'satelliteutc': 1705496783}]}

標籤:

0 個意見:

張貼留言

訂閱 張貼留言 [Atom]

<< 首頁