Ruby code for batch download of railscasts

Source: Internet
Author: User

Rails3 is coming out, and it's time to start learning. You can find a good tutorial on the Internet: http://railscasts.com/episodes, which can be downloaded.

Unfortunately, only 10 entries are displayed on each page and cannot be downloaded in batches. If you find the all episodes link in the right sidebar.

 

But there is no such thing. You can only click it one by one to see it. Carefully compare the two addresses

Http://railscasts.com/episodes/234-simple-form

Http://media.railscasts.com/videos/234_simple_form.mov

They found that there was a certain relationship between them, and they were ecstatic, so they had the following:Code

 
Require 'open-Uri 'Open ('HTTP: // railscasts.com/episodes/archive') Do | f | S = "F. each do | Line | S <Line End allurls = file. new (file. join ("C:", "railcastsvideourls.txt"), "W +") M =/href = "(\/episodes \/. +) "/URLs = S. scan (m) URLs. each {| x | begin allurls. puts X [0]. gsub (// episodes \ //, "http://media.railscasts.com/videos "). gsub (/-/,"_"). to_s + ". mov "end} allurls. closeend

 

Run the above code to get all the addresses to download. Of course, the premise is that you want to install Ruby. If you haven't installed Ruby, I will attach all the addresses! After finding the address, I believe everyone knows how to download it. You can write a ruby script to download it. Of course, I prefer thunder.

Http://media.railscasts.com/videos/234_simple_form.mov

Http://media.railscasts.com/videos/233_engage_with_devise.mov

Http://media.railscasts.com/videos/232_routing_walkthrough_part_2.mov

Http://media.railscasts.com/videos/231_routing_walkthrough.mov

Http://media.railscasts.com/videos/230_inherited_resources.mov

Http://media.railscasts.com/videos/229_polling_for_changes.mov

Http://media.railscasts.com/videos/228_sortable_table_columns.mov

Http://media.railscasts.com/videos/227_upgrading_to_rails_3_part_3.mov

Http://media.railscasts.com/videos/226_upgrading_to_rails_3_part_2.mov

Http://media.railscasts.com/videos/225_upgrading_to_rails_3_part_1.mov

Http://media.railscasts.com/videos/224_controllers_in_rails_3.mov

Http://media.railscasts.com/videos/223_charts.mov

Http://media.railscasts.com/videos/222_rack_in_rails_3.mov

Http://media.railscasts.com/videos/221_subdomains_in_rails_3.mov

Http://media.railscasts.com/videos/220_pdfkit.mov

Http://media.railscasts.com/videos/219_active_model.mov

Http://media.railscasts.com/videos/218_making_generators_in_rails_3.mov

Http://media.railscasts.com/videos/217_multistep_forms.mov

Http://media.railscasts.com/videos/216_generators_in_rails_3.mov

Http://media.railscasts.com/videos/215_advanced_queries_in_rails_3.mov

Http://media.railscasts.com/videos/214_a_ B _testing_with_a_bingo.mov

Http://media.railscasts.com/videos/213_calendars.mov

Http://media.railscasts.com/videos/212_refactoring_dynamic_delegator.mov

Http://media.railscasts.com/videos/211_validations_in_rails_3.mov

Http://media.railscasts.com/videos/210_customizing_devise.mov

Http://media.railscasts.com/videos/209_introducing_devise.mov

Http://media.railscasts.com/videos/208_erb_blocks_in_rails_3.mov

Http://media.railscasts.com/videos/207_syntax_highlighting.mov

Http://media.railscasts.com/videos/206_action_mailer_in_rails_3.mov

Http://media.railscasts.com/videos/205_unobtrusive_javascript.mov

Http://media.railscasts.com/videos/204_xss_protection_in_rails_3.mov

Http://media.railscasts.com/videos/203_routing_in_rails_3.mov

Http://media.railscasts.com/videos/202_active_record_queries_in_rails_3.mov

Http://media.railscasts.com/videos/201_bundler.mov

Http://media.railscasts.com/videos/200_rails_3_beta_and_rvm.mov

Http://media.railscasts.com/videos/199_mobile_devices.mov

Http://media.railscasts.com/videos/198_edit_multiple_individually.mov

Http://media.railscasts.com/videos/197_nested_model_form_part_2.mov

Http://media.railscasts.com/videos/196_nested_model_form_part_1.mov

Http://media.railscasts.com/videos/195_my_favorite_web_apps_in_2009.mov

Http://media.railscasts.com/videos/194_mongodb_and_mongomapper.mov

Http://media.railscasts.com/videos/193_tableless_model.mov

Http://media.railscasts.com/videos/192_authorization_with_cancan.mov

Http://media.railscasts.com/videos/191_mechanize.mov

Http://media.railscasts.com/videos/190_screen_scraping_with_nokogiri.mov

Http://media.railscasts.com/videos/189_embedded_association.mov

Http://media.railscasts.com/videos/188_declarative_authorization.mov

Http://media.railscasts.com/videos/187_testing_exceptions.mov

Http://media.railscasts.com/videos/186_pickle_with_cucumber.mov

Http://media.railscasts.com/videos/185_formtastic_part_2.mov

Http://media.railscasts.com/videos/184_formtastic_part_1.mov

Http://media.railscasts.com/videos/183_gemcutter_jeweler.mov

Http://media.railscasts.com/videos/182_cropping_images.mov

Http://media.railscasts.com/videos/181_include_vs_joins.mov

Http://media.railscasts.com/videos/180_finding_unused_css.mov

Http://media.railscasts.com/videos/179_seed_data.mov

Http://media.railscasts.com/videos/178_seven_security_tips.mov

Http://media.railscasts.com/videos/177_model_versioning.mov

Http://media.railscasts.com/videos/176_searchlogic.mov

Http://media.railscasts.com/videos/175_ajax_history_and_bookmarks.mov

Http://media.railscasts.com/videos/174_pagination_with_ajax.mov

Http://media.railscasts.com/videos/173_screen_scraping_with_scrapi.mov

Http://media.railscasts.com/videos/172_touch_and_cache.mov

Http://media.railscasts.com/videos/171_delayed_job.mov

Http://media.railscasts.com/videos/170_openid_with_authlogic.mov

Http://media.railscasts.com/videos/169_dynamic_page_caching.mov

Http://media.railscasts.com/videos/168_feed_parsing.mov

Http://media.railscasts.com/videos/167_more_on_virtual_attributes.mov

Http://media.railscasts.com/videos/166_metric_fu.mov

Http://media.railscasts.com/videos/165_edit_multiple.mov

Http://media.railscasts.com/videos/164_cron_in_ruby.mov

Http://media.railscasts.com/videos/163_self_referential_association.mov

Http://media.railscasts.com/videos/162_tree_based_navigation.mov

Http://media.railscasts.com/videos/161_three_profiling_tools.mov

Http://media.railscasts.com/videos/160_authlogic.mov

Http://media.railscasts.com/videos/159_more_on_cucumber.mov

Http://media.railscasts.com/videos/158_factories_not_fixtures.mov

Http://media.railscasts.com/videos/157_rspec_matchers_macros.mov

Http://media.railscasts.com/videos/156_webrat.mov

Http://media.railscasts.com/videos/155_beginning_with_cucumber.mov

Http://media.railscasts.com/videos/154_polymorphic_association.mov

Http://media.railscasts.com/videos/153_pdfs_with_prawn.mov

Http://media.railscasts.com/videos/152_rails_2_3_extras.mov

Http://media.railscasts.com/videos/151_rack_middleware.mov

Http://media.railscasts.com/videos/150_rails_metal.mov

Http://media.railscasts.com/videos/149_rails_engines.mov

Http://media.railscasts.com/videos/148_app_templates_in_rails_2_3.mov

Http://media.railscasts.com/videos/147_sortable_lists.mov

Http://media.railscasts.com/videos/146_paypal_express_checkout.mov

Http://media.railscasts.com/videos/145_integrating_active_merchant.mov

Http://media.railscasts.com/videos/144_active_merchant_basics.mov

Http://media.railscasts.com/videos/143_paypal_security.mov

Http://media.railscasts.com/videos/142_paypal_notifications.mov

Http://media.railscasts.com/videos/141_paypal_basics.mov

Http://media.railscasts.com/videos/140_rails_2_2_extras.mov

Http://media.railscasts.com/videos/139_nested_resources.mov

Http://media.railscasts.com/videos/138_i18n.mov

Http://media.railscasts.com/videos/137_memoization.mov

Http://media.railscasts.com/videos/136_jquery.mov

Http://media.railscasts.com/videos/135_making_a_gem.mov

Http://media.railscasts.com/videos/134_paperclip.mov

Http://media.railscasts.com/videos/133_capistrano_tasks.mov

Http://media.railscasts.com/videos/132_helpers_outside_views.mov

Http://media.railscasts.com/videos/131_going_back.mov

Http://media.railscasts.com/videos/130_monitoring_with_god.mov

Http://media.railscasts.com/videos/129_custom_daemon.mov

Http://media.railscasts.com/videos/128_starling_and_workling.mov

Http://media.railscasts.com/videos/127_rake_in_background.mov

Http://media.railscasts.com/videos/126_populating_a_database.mov

Http://media.railscasts.com/videos/125_dynamic_layouts.mov

Http://media.railscasts.com/videos/124_beta_invitations.mov

Http://media.railscasts.com/videos/123_subdomains.mov

Http://media.railscasts.com/videos/122_passenger_in_development.mov

Http://media.railscasts.com/videos/121_non_active_record_model.mov

Http://media.railscasts.com/videos/120_thinking_sphinx.mov

Http://media.railscasts.com/videos/119_session_based_model.mov

Http://media.railscasts.com/videos/118_liquid.mov

Http://media.railscasts.com/videos/117_semi_static_pages.mov

Http://media.railscasts.com/videos/116_selenium.mov

Http://media.railscasts.com/videos/115_caching_in_rails_2_1.mov

Http://media.railscasts.com/videos/114_endless_page.mov

Http://media.railscasts.com/videos/113_contributing_to_rails_with_git.mov

Http://media.railscasts.com/videos/112_anonymous_scopes.mov

Http://media.railscasts.com/videos/111_advanced_search_form.mov

Http://media.railscasts.com/videos/110_gem_dependencies.mov

Http://media.railscasts.com/videos/109_tracking_attribute_changes.mov

Http://media.railscasts.com/videos/108_named_scope.mov

Http://media.railscasts.com/videos/107_migrations_in_rails_2_1.mov

Http://media.railscasts.com/videos/106_time_zones_in_rails_2_1.mov

Http://media.railscasts.com/videos/105_gitting_rails_2_1_rc1.mov

Http://media.railscasts.com/videos/104_exception_notifications.mov

Http://media.railscasts.com/videos/103_site_wide_announcements.mov

Http://media.railscasts.com/videos/102_auto_complete_association.mov

Http://media.railscasts.com/videos/101_refactoring_out_helper_object.mov

Http://media.railscasts.com/videos/100_5_view_tips.mov

Http://media.railscasts.com/videos/99_complex_partials.mov

Http://media.railscasts.com/videos/98_request_profiling.mov

Http://media.railscasts.com/videos/97_analyzing_the_production_log.mov

Http://media.railscasts.com/videos/96_git_on_rails.mov

Http://media.railscasts.com/videos/95_more_on_activeresource.mov

Http://media.railscasts.com/videos/94_activeresource_basics.mov

Http://media.railscasts.com/videos/93_action_caching.mov

Http://media.railscasts.com/videos/92_make_resourceful.mov

Http://media.railscasts.com/videos/91_refactoring_long_methods.mov

Http://media.railscasts.com/videos/90_fragment_caching.mov

Http://media.railscasts.com/videos/89_page_caching.mov

Http://media.railscasts.com/videos/88_dynamic_select_menus.mov

Http://media.railscasts.com/videos/87_generating_rss_feeds.mov

Http://media.railscasts.com/videos/86_logging_variables.mov

Http://media.railscasts.com/videos/85_yaml_configuration_file.mov

Http://media.railscasts.com/videos/84_cookie_based_session_store.mov

Http://media.railscasts.com/videos/83_migrations_in_rails_2_0.mov

Http://media.railscasts.com/videos/82_http_basic_authentication.mov

Http://media.railscasts.com/videos/81_fixtures_in_rails_2_0.mov

Http://media.railscasts.com/videos/80_simplify_views_with_rails_2_0.mov

Http://media.railscasts.com/videos/79_generate_named_routes.mov

Http://media.railscasts.com/videos/78_generating_pdf_documents.mov

Http://media.railscasts.com/videos/77_destroy_without_javascript.mov

Http://media.railscasts.com/videos/76_scope_out.mov

Http://media.railscasts.com/videos/75_complex_forms_part_3.mov

Http://media.railscasts.com/videos/74_complex_forms_part_2.mov

Http://media.railscasts.com/videos/73_complex_forms_part_1.mov

Http://media.railscasts.com/videos/72_adding_an_environment.mov

Http://media.railscasts.com/videos/71_testing_controllers_with_rspec.mov

Http://media.railscasts.com/videos/70_custom_routes.mov

Http://media.railscasts.com/videos/69_markaby_in_helper.mov

Http://media.railscasts.com/videos/68_openid_authentication.mov

Http://media.railscasts.com/videos/67_restful_authentication.mov

Http://media.railscasts.com/videos/66_custom_rake_tasks.mov

Http://media.railscasts.com/videos/65_stopping_spam_with_akismet.mov

Http://media.railscasts.com/videos/64_custom_helper_modules.mov

Http://media.railscasts.com/videos/63_model_name_in_url.mov

Http://media.railscasts.com/videos/62_hacking_activerecord.mov

Http://media.railscasts.com/videos/61_sending_email.mov

Http://media.railscasts.com/videos/60_testing_without_fixtures.mov

Http://media.railscasts.com/videos/59_optimistic_locking.mov

Http://media.railscasts.com/videos/58_how_to_make_a_generator.mov

Http://media.railscasts.com/videos/57_create_model_through_text_field.mov

Http://media.railscasts.com/videos/56_the_logger.mov

Http://media.railscasts.com/videos/55_cleaning_up_the_view.mov

Http://media.railscasts.com/videos/54_debugging_with_ruby_debug.mov

Http://media.railscasts.com/videos/53_handling_exceptions.mov

Http://media.railscasts.com/videos/52_update_through_checkboxes.mov

Http://media.railscasts.com/videos/51_will_paginate.mov

Http://media.railscasts.com/videos/50_contributing_to_rails.mov

Http://media.railscasts.com/videos/49_reading_the_api.mov

Http://media.railscasts.com/videos/48_console_tricks.mov

Http://media.railscasts.com/videos/47_two_many_to_many.mov

Http://media.railscasts.com/videos/46_catch_all_route.mov

Http://media.railscasts.com/videos/45_rjs_tips.mov

Http://media.railscasts.com/videos/44_debugging_rjs.mov

Http://media.railscasts.com/videos/43_ajax_with_rjs.mov

Http://media.railscasts.com/videos/42_with_options.mov

Http://media.railscasts.com/videos/41_conditional_validations.mov

Http://media.railscasts.com/videos/40_blocks_in_view.mov

Http://media.railscasts.com/videos/39_customize_field_error.mov

Http://media.railscasts.com/videos/38_multibutton_form.mov

Http://media.railscasts.com/videos/37_simple_search_form.mov

Http://media.railscasts.com/videos/36_subversion_on_rails.mov

Http://media.railscasts.com/videos/35_custom_rest_actions.mov

Http://media.railscasts.com/videos/34_named_routes.mov

Http://media.railscasts.com/videos/33_making_a_plugin.mov

Http://media.railscasts.com/videos/32_time_in_text_field.mov

Http://media.railscasts.com/videos/31_formatting_time.mov

Http://media.railscasts.com/videos/30_pretty_page_title.mov

Http://media.railscasts.com/videos/29_group_by_month.mov

Http://media.railscasts.com/videos/28_in_groups_of.mov

Http://media.railscasts.com/videos/27_cross_site_scripting.mov

Http://media.railscasts.com/videos/26_hackers_love_mass_assignment.mov

Http://media.railscasts.com/videos/25_ SQL _injection.mov

Http://media.railscasts.com/videos/24_the_stack_trace.mov

Http://media.railscasts.com/videos/23_counter_cache_column.mov

Http://media.railscasts.com/videos/22_eager_loading.mov

Http://media.railscasts.com/videos/21_super_simple_authentication.mov

Http://media.railscasts.com/videos/20_restricting_access.mov

Http://media.railscasts.com/videos/19_where_administration_goes.mov

Http://media.railscasts.com/videos/18_looping_through_flash.mov

Http://media.railscasts.com/videos/17_habtm_checkboxes.mov

Http://media.railscasts.com/videos/16_virtual_attributes.mov

Http://media.railscasts.com/videos/15_fun_with_find_conditions.mov

Http://media.railscasts.com/videos/14_performing_calculations_on_models.mov

Http://media.railscasts.com/videos/13_dangers_of_model_in_session.mov

Http://media.railscasts.com/videos/12_refactoring_user_name_part_3.mov

Http://media.railscasts.com/videos/11_refactoring_user_name_part_2.mov

Http://media.railscasts.com/videos/10_refactoring_user_name_part_1.mov

Http://media.railscasts.com/videos/9_filtering_sensitive_logs.mov

Http://media.railscasts.com/videos/8_layouts_and_content_for.mov

Http://media.railscasts.com/videos/7_all_about_layouts.mov

Http://media.railscasts.com/videos/6_shortcut_blocks_with_symbol_to_proc.mov

Http://media.railscasts.com/videos/5_using_with_scope.mov

Http://media.railscasts.com/videos/4_move_find_into_model.mov

Http://media.railscasts.com/videos/3_find_through_association.mov

Http://media.railscasts.com/videos/2_dynamic_find_by_methods.mov

Http://media.railscasts.com/videos/1_caching_with_instance_variables.mov

Hope to help you!

Well, don't download your server.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.