Created
May 18, 2012 07:12
-
-
Save satococoa/2723728 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # usage: $ bundle exec ruby get_all_pdfs.rb | xargs -n 1 curl -O | |
| require 'bundler/setup' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'pp' | |
| page_url = URI.parse('https://developer.apple.com/jp/devcenter/ios/library/japanese.html') | |
| doc = Nokogiri::HTML(open(page_url)) | |
| doc.search('a[href$="pdf"]').each do |link| | |
| puts page_url + link[:href] | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment