Message Boards Message Boards

[✓] Get HTML of a website using Import?

GROUPS:

Hi. I am trying to use Import to read a webpage, but it doesn't seem to work. Please help.

website =  "https://www.cse.lk/home/company-info/JKH.N0000/announcements"
websiteData = Import[website]

websiteData just ends up as a blank string.

Any help would be much appreciated. Thank you.

Priyan.

POSTED BY: Priyan Fernando
Answer
1 month ago

The website you are trying to import is built with AngularJS. I don't think there is any way to 'get' its contents other than viewing in a modern web browser. Perhaps you could ask that company if they have an api that you could programmatically access.

POSTED BY: Chad Knutson
Answer
1 month ago

Group Abstract Group Abstract