这个网页的来源在哪里?

2024-10-03 13:23:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚开始学习Python,并在空闲时间参加了一些在线课程

我正试图找到这个网站的数据源,每天统计从机场出发的航班,并最终建立航班与日期的对比图

我已经花了两周的时间调查页面源代码,但是我找不到json源代码。善良的灵魂能告诉我json源在哪里吗?谢谢

https://www.changiairport.com/en/flights/departures.html


Tags: httpsjson源代码网站www时间页面数据源
1条回答
网友
1楼 · 发布于 2024-10-03 13:23:04

https://www.changiairport.com/cag-web/flights/departures?lang=en&callback=JSON_CALLBACK&date=today

好了。这会给你今天的航班表。日期参数也可能是其他的,但我不知道选项是什么。任何正常的get请求都应该有效,它似乎可以公开访问

您只需右键单击并转到“检查”,然后点击“网络”选项卡,然后浏览不同的请求

Just a note:
Just for the record, this is called scraping and it's often in a legal gray area where, so long as you aren't using it too extensively or making a profit off of it you probably won't get in any trouble, but just make sure you have permission from the company if you plan to make a lot of calls to an open API like this. It's usually against their terms of service, but as an unenforced clause that they will only use if you become a nuisance.

相关问题 更多 >