انجمن‌های فارسی اوبونتو

لطفاً به انجمن‌ها وارد شده و یا جهت ورود ثبت‌نام نمائید

لطفاً جهت ورود نام کاربری و رمز عبورتان را وارد نمائید


توزیع گنو/لینوکس اوبونتو ۲۰ ساله شد 🎉

نویسنده موضوع: چجوری بخشی خاص از یک متن رو توسط ترمینال استخراج کنم؟  (دفعات بازدید: 2468 بار)

0 کاربر و 2 مهمان درحال مشاهده موضوع.

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
خب اول کامل توضیح بدم چیکار میخوام بکنم که اگه کسی راهی ساده‌تر داشت بهم بتونه پیشنهاد بده(البته مسلما نمیخوام یه برنامه آماده باشه که همه این کارها رو انجام بده چون میخوام یکم درگیر کد نویسی بشم)! دارم یه بش اسکریپت مینویسم که به این شکل عمل کنه که اسم یک فیلم رو بهش بدم و اون هم بره سایت yts.to که همیشه ازش فیلم‌هام رو میگیرم چک کنه و اگه اون فیلم مورد نظر برای دانلود اومد لینک دانلود تورنت نسخه ۷۲۰ اون فیلم رو بده به deluge تا اون فیلم رو دانلود کنه روی سرور و من هم از روی سرور دانلودش کنم. برای همه قسمت‌های کد میدونم چیکار باید بکنم بجز برای قسمتی که لینک رو از تو سورس صفحه برداره. نمیدونم با چه ابزاری میتونم لینک دانلود تورنت رو بردارم. الآن هم که دارم این متن رو مینویسم سورس صفحه اول yts.to اینه:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!--[if IE]> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <![endif]--> <meta name="viewport" content="width=device-width, minimal-ui, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="description" content="The official YIFY Torrents website. Download free movie torrents for 720p, 1080p and 3D quality movies. The fastest downloads at the smallest size." /> <meta name="keywords" content="torrents, yify, yts, movies, movie, download, 720p, 1080p, 3D, browse movies, yify-torrents, yts" /> <meta property="og:title" content="YTS - The Official Home of YIFY Movie Torrent Downloads"/> <meta property="og:image" content="https://s.ynet.io/assets/images/website/og_yts_logo.png"/> <meta property="og:description" content="The official YIFY Torrents website. Download free movie torrents for 720p, 1080p and 3D quality movies. The fastest downloads at the smallest size."/> <meta property="og:url" content="https://yts.to//" /> <title>The Official Home of YIFY Movie Torrent Downloads - YTS</title> <!--[if IE]> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <![endif]--> <link rel="shortcut icon" href="https://s.ynet.io/assets/images/website/favicon.ico"> <link rel="apple-touch-icon" sizes="57x57" href="https://s.ynet.io/assets/images/website/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="114x114" href="https://s.ynet.io/assets/images/website/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="72x72" href="https://s.ynet.io/assets/images/website/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="144x144" href="https://s.ynet.io/assets/images/website/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="60x60" href="https://s.ynet.io/assets/images/website/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="120x120" href="https://s.ynet.io/assets/images/website/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="76x76" href="https://s.ynet.io/assets/images/website/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="152x152" href="https://s.ynet.io/assets/images/website/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="https://s.ynet.io/assets/images/website/apple-touch-icon-180x180.png"> <link rel="icon" type="image/png" href="https://s.ynet.io/assets/images/website/favicon-160x160.png" sizes="160x160"> <link rel="icon" type="image/png" href="https://s.ynet.io/assets/images/website/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="https://s.ynet.io/assets/images/website/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="https://s.ynet.io/assets/images/website/favicon-32x32.png" sizes="32x32"> <meta name="msapplication-TileColor" content="#00a300"> <meta name="msapplication-TileImage" content="https://s.ynet.io/assets/images/website/mstile-144x144.png"> <meta name="msapplication-config" content="https://s.ynet.io/assets/images/website/browserconfig.xml"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch" title="YTS - The Official Home of YIFY Movie Torrent Downloads" /> <link href='//fonts.googleapis.com/css?family=Arimo:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://yts.to/assets/fonts/fonts.css"> <link rel="stylesheet" href="https://yts.to/assets/minified/182046902f75b15cfeb335e0b38573dd.css"> </head> <body class="non-touch "> <header class="nav-bar"> <div class="nav-logo pull-left"> <a href="https://yts.to"> <img src="https://s.ynet.io/assets/images/website/logo-YTS.svg" alt="" /> </a> </div> <span class="header-slogan hidden-xs pull-left">HD movies at the smallest file size.</span> <div class="main-nav-links hidden-sm hidden-xs"> <form method="GET" action="https://yts.to/search-movies" accept-charset="UTF-8" id="quick-search" name="quick-search"> <div id="quick-search-container"> <input id="quick-search-input" name="query" autocomplete="off" type="search" value="Quick search"> <div class="ajax-spinner"></div> </div> </form> <ul class="nav-links"> <li> <a href="https://yts.to"> Home </a> </li> <li> <a href="https://yts.to/browse-movies"> Browse Movies </a> </li>  </ul>  <ul class="nav-links nav-link-guest"> <li> <a class="login-nav-btn" href="javascript:void(0)"> Login </a> &nbsp;|&nbsp; <a class="register-nav-btn" href="javascript:void(0)"> Register </a> </li> </ul>  </div> <div class="nav-mobile-buttons hidden-md hidden-lg"> <a class="touchable" id="mobile-search-btn" href="javascript:void(0)"> <span class="glyphicon glyphicon-search"></span> </a> <a class="touchable" href="https://yts.to/browse-movies"> <span class="glyphicon glyphicon-list-alt"></span> </a>  <a class="touchable" href="https://yts.to/login"> <span class="glyphicon glyphicon-user"></span> </a>    </div> </header>  <div id="background-image" style="background: url(https://s.ynet.io/assets/images/movies/cinderella_2015/background.jpg) no-repeat center center; background-size: cover; -webkit-background-size: cover;-moz-background-size: cover; -o-background-size: cover;"></div> <div id="background-overlay"></div>   <div class="modal modal-auth hidden-xs hidden-sm"> <div class="modal-container"> <div class="modal-switcher"> <span id="modal-login"> Login </span> <span id="modal-register"> Register </span> </div> <div class="modal-content"> <div class="modal-login-content"> <form method="POST" action="https://yts.to" accept-charset="UTF-8" autocorrect="off" autocapitalize="off" spellcheck="off"><input name="_token" type="hidden" value="VH6fQ6teLNRQviC0z0kCVbV5LGg4ZbqtUDa36XQV"> <span class="error-msg"></span> <div class="inner-addon"> <span class="glyphicon glyphicon-user"></span> <input placeholder="Username or Email" autocorrect="off" autocapitalize="off" spellcheck="off" name="username" type="text"> </div> <div class="inner-addon"> <span class="glyphicon glyphicon-lock"></span> <input placeholder="Password" autocorrect="off" autocapitalize="off" spellcheck="off" name="password" type="password" value=""> </div> <button class="button-green-download-big" type="button">Login</button> </form> <p class="bottom-msg"> <a class="forgotpassword-nav-btn" href="javascript:void(0)">Forgot your password?</a> </p> </div> <div class="modal-register-content"> <form method="POST" action="https://yts.to" accept-charset="UTF-8" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off"><input name="_token" type="hidden" value="VH6fQ6teLNRQviC0z0kCVbV5LGg4ZbqtUDa36XQV"> <span class="error-msg"></span> <div class="inner-addon"> <span class="glyphicon glyphicon-user"></span> <input placeholder="Username" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off" name="username" type="text"> </div> <div class="inner-addon"> <span class="glyphicon glyphicon-envelope"></span> <input placeholder="E-Mail" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off" name="email" type="email"> </div> <div class="inner-addon"> <span class="glyphicon glyphicon-lock"></span> <input placeholder="Password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off" name="password" type="password" value=""> </div> <div class="inner-addon"> <span class="glyphicon glyphicon-lock"></span> <input placeholder="Confirm Password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off" name="password_confirmation" type="password" value=""> </div> <button class="button-green-download-big" type="button">Register</button> </form> </div> <div class="modal-forgotpass-content"> <form method="POST" action="https://yts.to" accept-charset="UTF-8" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off"><input name="_token" type="hidden" value="VH6fQ6teLNRQviC0z0kCVbV5LGg4ZbqtUDa36XQV"> <span class="error-msg"></span> <p class="info-msg"> If you have Forgotten your password, just type in your Email and we will send you a link to Reset your password. </p> <div class="inner-addon"> <span class="glyphicon glyphicon-envelope"></span> <input placeholder="E-Mail" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="off" name="email" type="email"> </div> <button class="button-green-download-big" type="button">Reset Password</button> </form> <p class="bottom-msg"> <a class="login-nav-btn" href="javascript:void(0)">Back to login</a> </p> </div> <div class="modal-loading-content"> <img src="https://s.ynet.io/assets/images/website/ajax-spinner.gif" alt="ajax spinner loading" /> <p class="info-msg"> Loading, please wait </p> </div> </div> </div> </div>  <div class="main-content">  <div id="mobile-search-input" class="hidden-md hidden-lg"> <form method="POST" action="https://yts.to/search-movies" accept-charset="UTF-8"><input name="_token" type="hidden" value="VH6fQ6teLNRQviC0z0kCVbV5LGg4ZbqtUDa36XQV"> <div class="input-group container search-query"> <input class="form-control" placeholder="Search for a movie&hellip;" autocorrect="off" autocomplete="off" name="keyword" type="search"> <span class="input-group-btn"> <button class="btn btn-success" type="submit">Search</button> </span> </div> <div class="container"> <div class="row"> <div class="col-xs-10"> <div class="selects-container"> <p>Quality:</p> <select name="quality"><option value="all" selected="selected">All</option><option value="720p">720p</option><option value="1080p">1080p</option><option value="3d">3D</option></select> </div> <div class="selects-container"> <p>Genre:</p> <select name="genre"><option value="all" selected="selected">All</option><option value="action">Action</option><option value="adventure">Adventure</option><option value="animation">Animation</option><option value="biography">Biography</option><option value="comedy">Comedy</option><option value="crime">Crime</option><option value="documentary">Documentary</option><option value="drama">Drama</option><option value="family">Family</option><option value="fantasy">Fantasy</option><option value="filmnoir">Film-Noir</option><option value="history">History</option><option value="horror">Horror</option><option value="music">Music</option><option value="musical">Musical</option><option value="mystery">Mystery</option><option value="news">News</option><option value="romance">Romance</option><option value="scifi">Sci-Fi</option><option value="short">Short</option><option value="sport">Sport</option><option value="thriller">Thriller</option><option value="war">War</option><option value="western">Western</option></select> </div> </div> <div class="col-xs-10"> <div class="selects-container"> <p>Rating:</p> <select name="rating"><option value="0" selected="selected">All</option><option value="9">9+</option><option value="8">8+</option><option value="7">7+</option><option value="6">6+</option><option value="5">5+</option><option value="4">4+</option><option value="3">3+</option><option value="2">2+</option><option value="1">1+</option></select> </div> <div class="selects-container selects-container-last"> <p>Order By:</p> <select name="order_by"><option value="latest" selected="selected">Latest</option><option value="oldest">Oldest</option><option value="seeds">Seeds</option><option value="peers">Peers</option><option value="year">Year</option><option value="rating">Rating</option><option value="likes">Likes</option><option value="alphabetical">Alphabetical</option><option value="downloads">Downloads</option></select> </div> </div> </div> </div> </form> </div> <div class="ac-results hidden-sm hidden-xs"> <ul></ul> </div> <noscript> <div class="container"> <div class="row"> <div class="col-xs-20 text-center"> <p class="no-javascript-warning">Javascript not supported on your browser, please enable Javascript in order to fully utilize the website</p> </div> </div> </div> </noscript>  <div class="container home-content"> <div class="hidden-xs hidden-sm"> <h1>Download HD movies at the smallest size</h1> <p>Welcome to the official YTS website. Here you will be able to browse and download movies in excellent 720p, 1080p and 3D quality, all at the smallest file size.</p>  </div> <div id="popular-downloads"> <div class="row"> <h2><span class="icon-star"></span>Popular Downloads <a href="https://yts.to/rss-guide"><img title="RSS" src="https://s.ynet.io/assets/images/website/rss-icon.png" alt="RSS" /></a></h2> </div> <div class="row">   <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/cinderella-2015" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/cinderella_2015/medium-cover.jpg" alt="Cinderella (2015) download" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">7.4 / 10</h4> <h4>Drama</h4>  <h4>Family</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/cinderella-2015" class="browse-movie-title">Cinderella</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/6EB6804A6A4650FD64C9FC3257C2B2ECB7808F50.torrent">720p</a>    <a href="https://yts.to/torrent/download/93E545F95354D90539C51BC3A59AC685B613C75C.torrent">1080p</a>   </div>  </div> </div>  <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/while-were-young-2014" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/while_were_young_2014/medium-cover.jpg" alt="While We&#039;re Young (2014) download" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">6.8 / 10</h4> <h4>Comedy</h4>  <h4>Drama</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/while-were-young-2014" class="browse-movie-title">While We&#039;re Young</a> <div class="browse-movie-year">2014</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/EDF9E386BBFEE1AB8AD8585986EDAFC91E75617E.torrent">1080p</a>    <a href="https://yts.to/torrent/download/E12B5209FF9F483DE89AFD446D918E085F38B826.torrent">720p</a>   </div>  </div> </div>  <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/woman-in-gold-2015" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/woman_in_gold_2015/medium-cover.jpg" alt="Woman in Gold (2015) download" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">7.5 / 10</h4> <h4>Drama</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/woman-in-gold-2015" class="browse-movie-title">Woman in Gold</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/2BE9595BC6FCA45C93D1D5651362105CA4B19692.torrent">720p</a>    <a href="https://yts.to/torrent/download/FCA5C4C46B69C5A4714FCCBDECD48F94A3321C14.torrent">1080p</a>   </div>  </div> </div>  <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/the-gunman-2015" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/the_gunman_2015/medium-cover.jpg" alt="The Gunman (2015) download" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">5.6 / 10</h4> <h4>Action</h4>  <h4>Crime</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/the-gunman-2015" class="browse-movie-title">The Gunman</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/29DBECF9C558BB81697FCCF63FDAF2D6A077EB2C.torrent">720p</a>    <a href="https://yts.to/torrent/download/73D041915689295E33DE297153C87A427B23B276.torrent">1080p</a>   </div>  </div> </div>   </div> </div> </div> <div class="content-dark"> <div class="container home-content"> <div class="home-movies"> <div class="row"> <h2>Latest Movie Torrents <a href="https://yts.to/browse-movies">Browse All</a></h2> </div>    <div class="row">   <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/army-of-frankensteins-2013" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/army_of_frankensteins_2013/medium-cover.jpg" alt="Army of Frankensteins (2013) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner720p.png" alt="Army of Frankensteins (2013) download 720p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">6.2 / 10</h4> <h4>Adventure</h4>  <h4>Horror</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/army-of-frankensteins-2013" class="browse-movie-title">Army of Frankensteins</a> <div class="browse-movie-year">2013</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/D8B75117E0AF30F51D351D5EC315F4DE922E00D4.torrent">720p</a>    <a href="https://yts.to/torrent/download/8B7D4B31489BD75B3FA4E7DDFBC038DCCA37F5D2.torrent">1080p</a>   </div>  </div> </div>     <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/woman-in-gold-2015" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/woman_in_gold_2015/medium-cover.jpg" alt="Woman in Gold (2015) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner1080p.png" alt="Woman in Gold (2015) download 1080p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">7.5 / 10</h4> <h4>Drama</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/woman-in-gold-2015" class="browse-movie-title">Woman in Gold</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/2BE9595BC6FCA45C93D1D5651362105CA4B19692.torrent">720p</a>    <a href="https://yts.to/torrent/download/FCA5C4C46B69C5A4714FCCBDECD48F94A3321C14.torrent">1080p</a>   </div>  </div> </div>     <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/army-of-frankensteins-2013" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/army_of_frankensteins_2013/medium-cover.jpg" alt="Army of Frankensteins (2013) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner1080p.png" alt="Army of Frankensteins (2013) download 1080p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">6.2 / 10</h4> <h4>Adventure</h4>  <h4>Horror</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/army-of-frankensteins-2013" class="browse-movie-title">Army of Frankensteins</a> <div class="browse-movie-year">2013</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/D8B75117E0AF30F51D351D5EC315F4DE922E00D4.torrent">720p</a>    <a href="https://yts.to/torrent/download/8B7D4B31489BD75B3FA4E7DDFBC038DCCA37F5D2.torrent">1080p</a>   </div>  </div> </div>     <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/american-justice-2015" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/american_justice_2015/medium-cover.jpg" alt="American Justice (2015) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner1080p.png" alt="American Justice (2015) download 1080p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">2.6 / 10</h4> <h4>Action</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/american-justice-2015" class="browse-movie-title">American Justice</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/2AD399249D95BC8E4667C27B827330D79983E0A9.torrent">720p</a>    <a href="https://yts.to/torrent/download/0B5E75E377B090B6E4B34260634DF69CDE1FA177.torrent">1080p</a>   </div>  </div> </div>     </div> <div class="row">  <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/american-justice-2015" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/american_justice_2015/medium-cover.jpg" alt="American Justice (2015) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner720p.png" alt="American Justice (2015) download 720p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">2.6 / 10</h4> <h4>Action</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/american-justice-2015" class="browse-movie-title">American Justice</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/2AD399249D95BC8E4667C27B827330D79983E0A9.torrent">720p</a>    <a href="https://yts.to/torrent/download/0B5E75E377B090B6E4B34260634DF69CDE1FA177.torrent">1080p</a>   </div>  </div> </div>     <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/fear-clinic-2014" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/fear_clinic_2014/medium-cover.jpg" alt="Fear Clinic (2014) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner1080p.png" alt="Fear Clinic (2014) download 1080p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">6.1 / 10</h4> <h4>Horror</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/fear-clinic-2014" class="browse-movie-title">Fear Clinic</a> <div class="browse-movie-year">2014</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/9D0D7F8DE8C9890790096CA6BD165B887B1FA5A4.torrent">720p</a>    <a href="https://yts.to/torrent/download/E0152B4EF31863DA93419A0731D77438202DC79F.torrent">1080p</a>   </div>  </div> </div>     <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/fear-clinic-2014" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/fear_clinic_2014/medium-cover.jpg" alt="Fear Clinic (2014) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner720p.png" alt="Fear Clinic (2014) download 720p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">6.1 / 10</h4> <h4>Horror</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/fear-clinic-2014" class="browse-movie-title">Fear Clinic</a> <div class="browse-movie-year">2014</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/9D0D7F8DE8C9890790096CA6BD165B887B1FA5A4.torrent">720p</a>    <a href="https://yts.to/torrent/download/E0152B4EF31863DA93419A0731D77438202DC79F.torrent">1080p</a>   </div>  </div> </div>     <div class="browse-movie-wrap col-xs-10 col-sm-5">  <a href="https://yts.to/movie/raiders-of-the-lost-shark-2014" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/movies/raiders_of_the_lost_shark_2014/medium-cover.jpg" alt="Raiders of the Lost Shark (2014) download" />  <img class="quality-banner img-responsive" src="https://s.ynet.io/assets/images/website/banner1080p.png" alt="Raiders of the Lost Shark (2014) download 1080p" />  <figcaption class="hidden-xs hidden-sm"> <span class="icon-star"></span> <h4 class="rating">3.7 / 10</h4> <h4>Horror</h4>  <span class="button-green-download-big">View Details</span> </figcaption> </figure> </a> <div class="browse-movie-bottom">   <a href="https://yts.to/movie/raiders-of-the-lost-shark-2014" class="browse-movie-title">Raiders of the Lost Shark</a> <div class="browse-movie-year">2014</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/C2C187968CBF5C4583DE29823095C080075B0EF6.torrent">720p</a>    <a href="https://yts.to/torrent/download/1676080762DB54CEAC36ABBC2DC83C2A6631D45C.torrent">1080p</a>   </div>  </div> </div>  </div>    </div> </div> </div>  <div class="container home-content"> <div class="home-movies"> <div class="row"> <h2>Upcoming Movies <a href="https://yts.to/requests">Request a Movie</a></h2> </div> <div class="row">  <div class="browse-movie-wrap col-xs-10 col-sm-5"> <a href="http://www.imdb.com/title/tt0086197/" target="_blank" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/upcoming/143026599391.jpg" alt="" /> <figcaption class="hidden-xs hidden-sm imdb-upcoming"> <span class="button-green-download-big button-yellow-download-big">View IMDb</span> </figcaption> </figure> </a> <div class="browse-movie-bottom"> <a href="http://www.imdb.com/title/tt0086197/" target="_blank" class="browse-movie-title">The Right Stuff</a> <div class="browse-movie-year">1983</div> </div> </div>  <div class="browse-movie-wrap col-xs-10 col-sm-5"> <a href="http://www.imdb.com/title/tt1893415/" target="_blank" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/upcoming/142908477115.jpg" alt="" /> <figcaption class="hidden-xs hidden-sm imdb-upcoming"> <span class="button-green-download-big button-yellow-download-big">View IMDb</span> </figcaption> </figure> </a> <div class="browse-movie-bottom"> <a href="http://www.imdb.com/title/tt1893415/" target="_blank" class="browse-movie-title">Infected</a> <div class="browse-movie-year">2013</div> </div> </div>  <div class="browse-movie-wrap col-xs-10 col-sm-5"> <a href="http://www.imdb.com/title/tt2872570/" target="_blank" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/upcoming/142618721192.jpg" alt="" /> <figcaption class="hidden-xs hidden-sm imdb-upcoming"> <span class="button-green-download-big button-yellow-download-big">View IMDb</span> </figcaption> </figure> </a> <div class="browse-movie-bottom"> <a href="http://www.imdb.com/title/tt2872570/" target="_blank" class="browse-movie-title">On Any Sunday: The Next Chapter</a> <div class="browse-movie-year">2014</div> </div> </div>  <div class="browse-movie-wrap col-xs-10 col-sm-5"> <a href="http://www.imdb.com/title/tt0114682/" target="_blank" class="browse-movie-link"> <figure> <img class="img-responsive" src="https://s.ynet.io/assets/images/upcoming/142867091710.jpg" alt="" /> <figcaption class="hidden-xs hidden-sm imdb-upcoming"> <span class="button-green-download-big button-yellow-download-big">View IMDb</span> </figcaption> </figure> </a> <div class="browse-movie-bottom"> <a href="http://www.imdb.com/title/tt0114682/" target="_blank" class="browse-movie-title">To Wong Foo Thanks for Everything, Julie Newmar</a> <div class="browse-movie-year">1995</div> </div> </div>  </div> </div> </div>   <div class="container hidden-md hidden-lg"> <div class="row"> <div class="mobile-footer"> <div class="col-sm-20"> <a href="https://yts.to"> <span class="glyphicon glyphicon-home"></span> <p>Home</p> </a> <a href="https://yts.to/browse-movies"> <span class="glyphicon glyphicon-list-alt"></span> <p>Browse</p> </a>  <a href="https://yts.to/login"> <span class="glyphicon glyphicon-log-in"></span> <p>Login</p> </a>  </div> <div class="col-sm-20">  <a href="https://yts.to/register"> <span class="glyphicon glyphicon-user"></span> <p>Register</p> </a>  <a href="https://yts.to/requests"> <span class="glyphicon glyphicon-asterisk"></span> <p>Requests</p> </a> <a href="https://yts.to/suggestions"> <span class="glyphicon glyphicon-pushpin"></span> <p>Suggestions</p> </a> </div> </div> </div> </div> <a class="hidden-xs" target="_blank" href="/ad/seedbox"> <img src="//i.imgur.com/T7quDbC.jpg" /> </a> <footer> <div class="container"> <div class="row"> <div class="col-xs-20"> <ul class="text-center"> <li>YTS &copy; 2011 - 2015</li> <li>-</li> <li><a href="https://yts.to/blog">Blog</a></li> <li>-</li> <li><a href="https://yts.to/dmca">DMCA</a></li> <li>-</li> <li><a href="https://yts.to/api">API</a></li> <li>-</li> <li><a href="https://yts.to/rss-guide">RSS</a></li> <li>-</li> <li><a href="https://yts.to/contact">Contact</a></li> <li>-</li> <li><a href="https://yts.to/browse-movies">Browse Movies</a></li>  <li>-</li> <li><a href="https://yts.to/login">Login</a></li>  <li>-</li> <li><a href="https://yts.to/languages">Language</a></li> </ul> </div> </div> <div class="row"> <div class="col-xs-20"> <ul class="text-center"> <li><a href="http://piratehd.com/" target="_blank">PirateHD</a></li> <li>-</li> <li><a href="http://www.yifysubtitles.com/" target="_blank">YIFYSubtitles</a></li> <li>-</li> <li><a href="https://www.facebook.com/YIFYTORRENTS" target="_blank"><span class="icon-facebook"></span></a></li> <li>-</li> <li><a href="https://twitter.com/YIFY_Torrents" target="_blank"><span class="icon-twitter"></span></a></li> </ul> </div> </div> </div> </footer> </div> <script type="text/javascript" src="https://s.ynet.io/assets/minified/ff779c88a997f8d26baf58a0b8de0b8f.js"></script> <script>
و مثلا برای فیلم سیندرلا کد بخشی که لینک دانلود تورنتش قرار داره اینه:

<a href="https://yts.to/movie/cinderella-2015" class="browse-movie-title">Cinderella</a> <div class="browse-movie-year">2015</div>  <div class="browse-movie-tags">   <a href="https://yts.to/torrent/download/6EB6804A6A4650FD64C9FC3257C2B2ECB7808F50.torrent">720p</a>    <a href="https://yts.to/torrent/download/93E545F95354D90539C51BC3A59AC685B613C75C.torrent">1080p</a>   </div>  </div> </div>
و من فقط میخوام لینک دانلود نسخه ۷۲۰ رو داشته باشم. حالا چجوریش رو نیازمند یاری سبز شما دوستان هستم...

آفلاین حامد مصافی

  • Jr. Member
  • *
  • ارسال: 60
من قبلا این کار را کردم. البته با کمی بهبود نسبت به این نسخه
http://forum.ubuntu.ir/index.php/topic,116866.msg948401.html#msg948401

شما باید از لوله‌کشی به یک فرمان egrep استفاده کنید.

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
من قبلا این کار را کردم. البته با کمی بهبود نسبت به این نسخه
http://forum.ubuntu.ir/index.php/topic,116866.msg948401.html#msg948401

شما باید از لوله‌کشی به یک فرمان egrep استفاده کنید.

ممنون. منم یه چیزایی پیدا کرده بودم که با egrep‌ میشه این کار رو کرد ولی مسئله اینه از نحوه استفادش سردر نمیادم. مثلا تو این کد شما \"(\/subtitles\/[^"]+)\".+\s(\S+).S([0-9]{2})E([0-9]{2})(\S+)\s یعنی چی؟

آفلاین حامد مصافی

  • Jr. Member
  • *
  • ارسال: 60
برای پیدا کردن الگو در یک رشته زبان توصیفی وجود داره به نام Regex (برای اطلاعات بیشتر اینترنت را گوگل کنید، مملو از مراجع این زبان است) فرمان egrep یک الگو را میگیرد و در یک رشته به دنبال عباراتی که در آن الگو صدق می‌کنند میگردد. در همین مثالی که فرمودید:

ابتدا یک "
سپس /
عبارت subtitle
عبارت /
هر چیزی به جز " به تعداد بیشتر از یکی
یک "
هر چیزی بیشتر از یکی
جای خالی
کاراکتر غیر جای خالی بیشتر از یکی
یک چیزی
حرف s و دو عدد
یک کاراکتر غیر مهم
حرف e و دو عدد
کاراکتر غیر فاصله به تعداد بیشتر از یک
و در نهایت یک فاصله


این الگوی یک زیر‌نویس بود که من بر طبق اون اطلاعات رو اط صفحه استخراج کردم.

آفلاین 藤沼

  • Sr. Member
  • *
  • ارسال: 414
  • جنسیت : پسر
برای اینطور کارها همیشه به دنبال API سایت بگردید اگر نبود بعدن به سراغ وب تراشی (Web Scraping) برید. وبسایت YTS ای‌پی‌آی خیلی خوبی داره که می‌تونید درون لینک پایین جزئیاتش رو ببینید:
https://yts.to/api#list_movies

نکته: نمی‌دونم تابه‌حال به کانال آی‌ار‌سی RegEx سر زدید یا نه ولی شعار خوبی دارن: «هیچ‌وقت اچ‌ات‌ام‌ال رو (با) رجکس (تجزیه) نکنید».
« آخرین ویرایش: 31 خرداد 1394، 09:23 ب‌ظ توسط نوید راد »

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
برای اینطور کارها همیشه به دنبال API سایت بگردید اگر نبود بعدن به سراغ وب تراشی (Web Scraping) برید. وبسایت YTS ای‌پی‌آی خیلی خوبی داره که می‌تونید درون لینک پایین جزئیاتش رو ببینید:
https://yts.to/api#list_movies

نکته: نمی‌دونم تا به حال به کانال آی‌ار‌سی RegEx سر زدید یا نه ولی شعار خوبی دارن: «هیچ‌وقت اچ‌ات‌ام‌ال رو (با) رجکس (تجزیه) نکنید».

خب مسئله ای که وجود داره اینه که تا حالا با ای پی آی کار نکردم  ;D الآن تنها چیزی که به ذهن من میرسه اینه که از این آدرس استفاده کنم
https://yts.to/api/v2/list_movies.json?quality=720p
و کد رو جوری بنویسم که هر وقت اسم فیلم مورد نظرم اومد توش با استفاده از regex هش فیلم رو بردارم و هش رو بدم به deluge تا دانلودش کنه.

آفلاین elyas74

  • Sr. Member
  • *
  • ارسال: 274
  • جنسیت : پسر
 - با javascript راحت میشه همچین کاری کرد، میتونی ی اسکریپت nodejs بنویسی که این کارُ برات انجام بده ، این لینک هست و یک کم هم خودت باید روش کار کنی... : http://www.sitepoint.com/web-scraping-in-node-js/
ubuntu16.04/unity/JavaScript

آفلاین حامد مصافی

  • Jr. Member
  • *
  • ارسال: 60
اگر قراره از جاوااسکریپت استفاده بشه نیم نگاهی هم به phantomjs بندازید.

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
با اینکه نوید خان کمکم کردن تا با api بتونم لینک دانلود فایل تورنت رو بگیرم ولی آخرش با regex‌کار خودمو راه انداختم  :oops: ;D کد نهایی رو هم تو وبلاگم گذاشتم: http://hamedworld.ir/?p=318