Skip to content

Instantly share code, notes, and snippets.

@Per9

Per9/parse.pl Secret

Last active August 14, 2018 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Per9/3b6831866ad1fe8484f7dc5f59056d7c to your computer and use it in GitHub Desktop.
Save Per9/3b6831866ad1fe8484f7dc5f59056d7c to your computer and use it in GitHub Desktop.
Parse firmware list
#!/usr/bin/perl
use HTML::Entities;
$_ = `curl -s https://openwrt.org/toh/views/datalist-csv`;
s#.*<ul class="dataplugin_list ">(.*?)</ul>.*#$1#s;
s#</li>[^<]*#\n#sg;
s/<.*?>//sg;
print decode_entities($_);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment