Created
December 18, 2019 05:06
-
-
Save sironekotoro/9d9a3b4aed208d81d51233f4c9cf59cc to your computer and use it in GitHub Desktop.
日経225構成銘柄の証券コードを取得する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use HTTP::Tiny; | |
my $URL = 'https://indexes.nikkei.co.jp/nkave/index/component?idx=nk225'; | |
my $response = HTTP::Tiny->new->get($URL); | |
die "Failed!\n" unless $response->{success}; | |
my @stock_code = $response->{content} =~ /scode=(\d{4})\"/g; | |
print "@stock_code"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment