{"id":18,"date":"2015-10-24T17:07:30","date_gmt":"2015-10-24T21:37:30","guid":{"rendered":"http:\/\/blog.thescorpius.com\/?p=18"},"modified":"2015-10-28T19:16:39","modified_gmt":"2015-10-28T23:46:39","slug":"cookies-support-on-qbittorrent","status":"publish","type":"post","link":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/","title":{"rendered":"Cookies support on qBittorrent"},"content":{"rendered":"<div style=\"width: 40%; padding: 0 10px 0 0; float: left;\"><a href=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-25\" src=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png?resize=288%2C200\" alt=\"qbittorrent\" width=\"288\" height=\"200\" \/><\/a><\/div>\n<div style=\"width: 50%; padding: 0 10px 0 0; float: right;\">Like most people I used to use <a href=\"\/\/www.utorrent.com\/\">\u03bcTorrent<\/a> to download files using the\u00a0<em>Bittorrent<\/em> protocol or like\u00a0they say now, to\u00a0<em>download torrents<\/em>.<\/div>\n<div style=\"width: 50%; padding: 0 10px 0 0; float: right;\">\n<p style=\"padding-top: 14px;\">Since version 3.x of\u00a0<a href=\"\/\/www.utorrent.com\/\">\u03bcTorrent<\/a>\u00a0some\u00a0people like me got away from it, since it became\u00a0<em>bloatware<\/em>. That all started when it was purchased by\u00a0BitTorrent, Inc., and the client has gone down hill from there. \u00a0It&#8217;s still the most popular torrent client on the planet though.<\/p>\n<\/div>\n<div style=\"clear: both;\"><\/div>\n<p>So I moved to <a href=\"http:\/\/qbittorent.org\">qBittorrent<\/a>\u00a0which is a wonderful client, but it lacks a feature that I really use and need: the ability to specify <i>cookies<\/i> when downloading a torrent from a URL using the WebUI.<\/p>\n<p>I also wanted another little feature that I really need: the forms have to support the\u00a0<em>autocomplete<\/em> feature of the internet browsers. \u00a0So when I fill a field in a form, the browser saves it for future use. For this to work the forms need to be\u00a0<strong>actual forms<\/strong>, and you&#8217;ll see\u00a0<a href=\"http:\/\/qbittorent.org\">qBittorrent<\/a>\u00a0doesn&#8217;t use them.<\/p>\n<p>Since\u00a0<a href=\"http:\/\/qbittorent.org\">qBittorrent<\/a>\u00a0is an Open Source project, it&#8217;s pretty easy to implement new features on.<\/p>\n<p><!--more--><\/p>\n<p><em>Note:\u00a0All this post is be based in\u00a0<a href=\"http:\/\/qbittorent.org\">qBittorrent<\/a>\u00a0beta version 3.3.0 + gitd60f2fc<\/em><\/p>\n<p>Let&#8217;s take a look at the download page located at src\/webui\/www\/public\/download.html:<\/p>\n<pre class=\"theme:turnwall nums:true lang:xhtml decode:true \">&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN\" \r\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd\"&gt;\r\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\" lang=\"en\" dir=\"ltr\"&gt;\r\n&lt;head&gt;\r\n        &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\" \/&gt;\r\n        &lt;title&gt;QBT_TR(Add Torrent Link)QBT_TR&lt;\/title&gt;\r\n        &lt;link rel=\"stylesheet\" href=\"css\/style.css\" type=\"text\/css\" \/&gt;\r\n        &lt;script type=\"text\/javascript\" \r\n                src=\"scripts\/mootools-1.2-core-yc.js\" \r\n                charset=\"utf-8\"&gt;\r\n        &lt;\/script&gt;\r\n        &lt;script type=\"text\/javascript\" \r\n                src=\"scripts\/download.js\" \r\n                charset=\"utf-8\"&gt;\r\n        &lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;center&gt;\r\n        &lt;h2 class=\"vcenter\"&gt;\r\n                QBT_TR(Download Torrents from their URLs or Magnet links)QBT_TR\r\n        &lt;\/h2&gt;\r\n        &lt;textarea id=\"urls\" rows=\"10\"&gt;&lt;\/textarea&gt;\r\n        QBT_TR(Only one link per line)QBT_TR\r\n        &lt;input type=\"button\" value=\"QBT_TR(Download)QBT_TR\" id=\"downButton\"\/&gt;\r\n&lt;\/center&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>As you can see it&#8217;s not a real HTML form. \u00a0It&#8217;s just a single field with a button. Then there&#8217;s some\u00a0JavaScript to make a REST request to download the URL that the user\u00a0types in the field. This is src\/webui\/www\/public\/scripts\/download.js:<\/p>\n<pre class=\"theme:turnwall nums:true lang:js decode:true \">window.addEvent('domready', function() {\r\n    $('urls').focus();\r\n    $('downButton').addEvent('click', function(e) {\r\n        new Event(e).stop();\r\n        new Request({\r\n            url: 'command\/download',\r\n            method: 'post',\r\n            data: {\r\n                urls: $('urls').value\r\n            },\r\n            onComplete: function() {\r\n                window.parent.document.getElementById('downloadPage').\r\n                    parentNode.removeChild(\r\n                        window.parent.document.getElementById('downloadPage')\r\n                    );\r\n            }\r\n        }).send();\r\n    });\r\n});<\/pre>\n<p>Since it is not a real form, this won&#8217;t allow my browser to save the fields so I can reuse them. \u00a0I don&#8217;t want to\u00a0copy\/paste the same\u00a0<em>cookie<\/em> over and over, so I had to modify this into a real form. Here&#8217;s what I want:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"458\" class=\"wp-image-29 aligncenter\" src=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download.png?resize=509%2C458\" alt=\"qbitorrent-download\" srcset=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download.png?w=509&amp;ssl=1 509w, https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download.png?resize=300%2C270&amp;ssl=1 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/a><\/p>\n<p>And this is what I came up with:<\/p>\n<pre class=\"theme:turnwall nums:true lang:xhtml decode:true \">\r\n\tQBT_TR(Add Torrent Link)QBT_TR\r\n\t<script src=\"scripts\/mootools-1.2-core-yc.js\" type=\"text\/javascript\" charset=\"utf-8\">\/\/ <![CDATA[\r\n    \r\n\/\/ ]]><\/script><script src=\"scripts\/download.js\" type=\"text\/javascript\" charset=\"utf-8\"><\/script><\/pre>\n<form id=\"downloadForm\" style=\"text-align: center;\" action=\"command\/download\" enctype=\"multipart\/form-data\" method=\"post\"><center><\/p>\n<h2 class=\"vcenter\">QBT_TR(Download Torrents from their URLs or Magnet links)QBT_TR<\/h2>\n<p><textarea id=\"urls\" name=\"urls\" rows=\"10\"><\/textarea> QBT_TR(Only one link per line)QBT_TR <label class=\"leftLabelLarge\" for=\"savepath\"> QBT_TR(Save files to location:)QBT_TR <\/label> <input id=\"savepath\" name=\"savepath\" type=\"text\" \/> <label class=\"leftLabelLarge\" for=\"cookie\">QBT_TR(Cookie:)QBT_TR<\/label> <input id=\"cookie\" name=\"cookie\" type=\"text\" \/> <label class=\"leftLabelLarge\" for=\"label\">QBT_TR(Label:)QBT_TR<\/label> <input id=\"label\" name=\"label\" type=\"text\" \/><script type=\"text\/javascript\">\/\/ <![CDATA[\n      getSavePath = function() {\n            var req = new Request({\n                    url: 'command\/getSavePath',\n                    method: 'get',\n\t\t    noCache: true,\n\t            onFailure: function() {\n                            alert(\"Could not contact qBittorrent\");\n                    },\n                    onSuccess: function(data) {\n                            if (data) {\n                                    $('savepath').setProperty('value', data);\n                            }\n                    }\n            }).send();\n      }\n   \n\/\/ ]]><\/script><\/p>\n<div id=\"submitbutton\"><button id=\"submitButton\" type=\"submit\">QBT_TR(Download)QBT_TR<\/button><\/div>\n<p><\/center><\/form>\n<p><script type=\"text\/javascript\">\/\/ <![CDATA[\ngetSavePath();\n\/\/ ]]><\/script><\/p>\n<p>So basically I&#8217;m doing three things here:<\/p>\n<ul>\n<li>Including a field for the download location and retrieving the default location via REST from the server. \u00a0That&#8217;s because I want my downloads organized\u00a0in several\u00a0folders.<\/li>\n<li>Including a\u00a0<em>cookie<\/em>\u00a0field where I can type all the cookies if I&#8217;m downloading from a URL of a private site that needs\u00a0an authentication first.<\/li>\n<li>Also I added a label field to set the label and keep things organized.<\/li>\n<\/ul>\n<p>From the server side I had to include the cookies in the\u00a0<em>AddTorrentParams<\/em>, that&#8217;s a structure that contains several torrents parameters. \u00a0I included:<\/p>\n<pre class=\"theme:turnwall nums:true lang:c++ decode:true \">QList cookies;<\/pre>\n<p>And modified a little bit the <em>command\/download\u00a0<\/em>request from the server side, to include the parsing of the <em>cookies<\/em><\/p>\n<pre class=\"theme:turnwall nums:true lang:c++ decode:true \">void WebApplication::action_command_download()\r\n{\r\n    CHECK_URI(0);\r\n    CHECK_PARAMETERS(\"urls\" &lt;&lt; \"savepath\" &lt;&lt; \"label\" &lt;&lt; \"cookie\");\r\n    QString urls = request().posts[\"urls\"];\r\n    QStringList list = urls.split('\\n');\r\n    QString savepath = request().posts[\"savepath\"];\r\n    QString label = request().posts[\"label\"];\r\n    QString cookie = request().posts[\"cookie\"];\r\n    QList&lt;QNetworkCookie&gt; cookies;\r\n    if (!cookie.isEmpty()) {\r\n\r\n        QStringList cookiesStr = cookie.split(\"; \");\r\n        foreach (QString cookieStr, cookiesStr)\r\n        {\r\n            cookieStr = cookieStr.trimmed();\r\n            QStringList pair = cookieStr.split(\"=\");\r\n            if (pair.size() == 2)\r\n            {\r\n                QNetworkCookie c(pair[0].toLatin1(),pair[1].toLatin1());\r\n                cookies &lt;&lt; c; \r\n            } \r\n        } \r\n    } \r\n    savepath = savepath.trimmed(); \r\n    label = label.trimmed(); \r\n    foreach (QString url, list) \r\n    { \r\n       url = url.trimmed(); \r\n       if (!url.isEmpty()) \r\n       { \r\n           if (url.startsWith(\"bc:\/\/bt\/\", Qt::CaseInsensitive)) \r\n           { \r\n               qDebug(\"Converting bc link to magnet link\"); \r\n               url = Utils::Misc::bcLinkToMagnet(url); \r\n           } \r\n           if ((url.size() == 40 &amp;&amp; !url.contains(QRegExp(\"[^0-9A-Fa-f]\"))) ||\r\n               (url.size() == 32 &amp;&amp; !url.contains(QRegExp(\"[^2-7A-Za-z]\")))) \r\n               url = \"magnet:?xt=urn:btih:\" + url; \r\n\r\n           BitTorrent::AddTorrentParams params; \r\n           params.savePath = savepath; \r\n           params.label = label; params.cookies = cookies;\r\n           BitTorrent::Session::instance()-&gt;addTorrent(url, params);\r\n        }\r\n    }\r\n\r\n    print(QString(\"&lt;script type=\\\"text\/javascript\\\"&gt;\"\r\n                  \"window.parent.closeWindows();&lt;\/script&gt;\"));\r\n}<\/pre>\n<p>I was losing the trick of closing the window automatically when the download is complete, since I&#8217;m not using\u00a0<em>click<\/em> event of the\u00a0<em>downButton<\/em>. \u00a0The only solution I could came up with was to send an HTML back that closed the window from the server. That&#8217;s the last line you see there in the code with a <em>window.parent.closeWindows()<\/em>.<\/p>\n<p>Now all I need that the <em>DownloadManager<\/em> actually send the <em>cookies<\/em> header in the download request, so I changed the <em>downloadUrl()<\/em> function a little bit, adding a new argument and setting the <em>cookies<\/em>:<\/p>\n<pre class=\"theme:turnwall nums:true lang:c++ decode:true \">DownloadHandler *DownloadManager::downloadUrl(const QString &amp;url, bool saveToFile, qint64 limit, \r\n                                              bool handleRedirectToMagnet, QList *cookies)\r\n{\r\n    \/\/ Update proxy settings\r\n    applyProxySettings();\r\n\r\n    \/\/ Process download request\r\n    qDebug(\"url is %s\", qPrintable(url));\r\n    const QUrl qurl = QUrl::fromEncoded(url.toUtf8());\r\n    QNetworkRequest request(qurl);\r\n\r\n    \/\/ Spoof Firefox 38 user agent to avoid web server banning\r\n    request.setRawHeader(\"User-Agent\", \"Mozilla\/5.0 (X11; Linux i686; rv:38.0) Gecko\/20100101 Firefox\/38.0\");\r\n\r\n    \/\/ Spoof HTTP Referer to allow adding torrent link from Torcache\/KickAssTorrents\r\n    request.setRawHeader(\"Referer\", request.url().toEncoded().data());\r\n\r\n    qDebug(\"Downloading %s...\", request.url().toEncoded().data());\r\n    \/\/ accept gzip\r\n    request.setRawHeader(\"Accept-Encoding\", \"gzip\");\r\n    if (cookies)\r\n        setCookiesFromUrl(*cookies, qurl);\r\n    return new DownloadHandler(m_networkManager.get(request), this, \r\n                               saveToFile, limit, handleRedirectToMagnet);\r\n}<\/pre>\n<p>And that&#8217;s it and it works really great. Now see it in action:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download-blur.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"457\" class=\"aligncenter size-medium wp-image-39\" src=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download-blur.png?resize=509%2C457\" alt=\"qbitorrent-download-blur\" srcset=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download-blur.png?w=509&amp;ssl=1 509w, https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbitorrent-download-blur.png?resize=300%2C269&amp;ssl=1 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/a><\/p>\n<p>Yay! The browser saved the last <em>cookie<\/em>\u00a0I used!<\/p>\n<p>If you&#8217;re interested in the whole patch you can see the code <a href=\"https:\/\/github.com\/naikel\/qBittorrent\/tree\/cookies\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Like most people I used to use \u03bcTorrent to download files using the\u00a0Bittorrent protocol or like\u00a0they say now, to\u00a0download torrents. Since version 3.x of\u00a0\u03bcTorrent\u00a0some\u00a0people like me got away from it, since it became\u00a0bloatware. That all started when it was purchased by\u00a0BitTorrent, Inc., and the client has gone down hill from there. \u00a0It&#8217;s still the most [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[14],"tags":[10],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-qbittorrent","tag-qbittorrent"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to make qBittorrent support cookies in its WebUI<\/title>\n<meta name=\"description\" content=\"How to modify your qBittorrent to allow setting the save path, label and cookies when downloading a torrent using the WebUI.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to make qBittorrent support cookies in its WebUI\" \/>\n<meta property=\"og:description\" content=\"How to modify your qBittorrent to allow setting the save path, label and cookies when downloading a torrent using the WebUI.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/\" \/>\n<meta property=\"og:site_name\" content=\"Scorpius\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-24T21:37:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-28T23:46:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png\" \/>\n<meta name=\"author\" content=\"TheScorpius666\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TheScorpius666\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/\"},\"author\":{\"name\":\"TheScorpius666\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/86f96e20f253dad7eb38d3c721a950de\"},\"headline\":\"Cookies support on qBittorrent\",\"datePublished\":\"2015-10-24T21:37:30+00:00\",\"dateModified\":\"2015-10-28T23:46:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/\"},\"wordCount\":621,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/7b346c3545c12a84ffdf2a30dfc69501\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/qbittorrent.png\",\"keywords\":[\"qbittorrent\"],\"articleSection\":[\"qBittorrent\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/\",\"url\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/\",\"name\":\"How to make qBittorrent support cookies in its WebUI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/qbittorrent.png\",\"datePublished\":\"2015-10-24T21:37:30+00:00\",\"dateModified\":\"2015-10-28T23:46:39+00:00\",\"description\":\"How to modify your qBittorrent to allow setting the save path, label and cookies when downloading a torrent using the WebUI.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/qbittorrent.png?fit=288%2C200&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/qbittorrent.png?fit=288%2C200&ssl=1\",\"width\":288,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2015\\\/10\\\/24\\\/cookies-support-on-qbittorrent\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.thescorpius.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cookies support on qBittorrent\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#website\",\"url\":\"https:\\\/\\\/blog.thescorpius.com\\\/\",\"name\":\"Scorpius\",\"description\":\"Random technology bits\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/7b346c3545c12a84ffdf2a30dfc69501\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.thescorpius.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/7b346c3545c12a84ffdf2a30dfc69501\",\"name\":\"Scorpius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\",\"caption\":\"Scorpius\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/86f96e20f253dad7eb38d3c721a950de\",\"name\":\"TheScorpius666\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g\",\"caption\":\"TheScorpius666\"},\"url\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/author\\\/thescorpius666\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to make qBittorrent support cookies in its WebUI","description":"How to modify your qBittorrent to allow setting the save path, label and cookies when downloading a torrent using the WebUI.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/","og_locale":"en_US","og_type":"article","og_title":"How to make qBittorrent support cookies in its WebUI","og_description":"How to modify your qBittorrent to allow setting the save path, label and cookies when downloading a torrent using the WebUI.","og_url":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/","og_site_name":"Scorpius","article_published_time":"2015-10-24T21:37:30+00:00","article_modified_time":"2015-10-28T23:46:39+00:00","og_image":[{"url":"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png","type":"","width":"","height":""}],"author":"TheScorpius666","twitter_card":"summary_large_image","twitter_misc":{"Written by":"TheScorpius666","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#article","isPartOf":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/"},"author":{"name":"TheScorpius666","@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/86f96e20f253dad7eb38d3c721a950de"},"headline":"Cookies support on qBittorrent","datePublished":"2015-10-24T21:37:30+00:00","dateModified":"2015-10-28T23:46:39+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/"},"wordCount":621,"commentCount":0,"publisher":{"@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/7b346c3545c12a84ffdf2a30dfc69501"},"image":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png","keywords":["qbittorrent"],"articleSection":["qBittorrent"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/","url":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/","name":"How to make qBittorrent support cookies in its WebUI","isPartOf":{"@id":"https:\/\/blog.thescorpius.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#primaryimage"},"image":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png","datePublished":"2015-10-24T21:37:30+00:00","dateModified":"2015-10-28T23:46:39+00:00","description":"How to modify your qBittorrent to allow setting the save path, label and cookies when downloading a torrent using the WebUI.","breadcrumb":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#primaryimage","url":"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png?fit=288%2C200&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2015\/10\/qbittorrent.png?fit=288%2C200&ssl=1","width":288,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/blog.thescorpius.com\/index.php\/2015\/10\/24\/cookies-support-on-qbittorrent\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.thescorpius.com\/"},{"@type":"ListItem","position":2,"name":"Cookies support on qBittorrent"}]},{"@type":"WebSite","@id":"https:\/\/blog.thescorpius.com\/#website","url":"https:\/\/blog.thescorpius.com\/","name":"Scorpius","description":"Random technology bits","publisher":{"@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/7b346c3545c12a84ffdf2a30dfc69501"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.thescorpius.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/7b346c3545c12a84ffdf2a30dfc69501","name":"Scorpius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g","caption":"Scorpius"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g"}},{"@type":"Person","@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/86f96e20f253dad7eb38d3c721a950de","name":"TheScorpius666","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g","caption":"TheScorpius666"},"url":"https:\/\/blog.thescorpius.com\/index.php\/author\/thescorpius666\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6SNpd-i","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":23,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":103,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts\/18\/revisions\/103"}],"wp:attachment":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}