zaidka / cliget Goto Github PK
View Code? Open in Web Editor NEWA Firefox addon to download login-protected files from the command line
Home Page: https://addons.mozilla.org/en-US/firefox/addon/cliget/
License: Mozilla Public License 2.0
A Firefox addon to download login-protected files from the command line
Home Page: https://addons.mozilla.org/en-US/firefox/addon/cliget/
License: Mozilla Public License 2.0
I find myself copying the URL and then opening a terminal and pasting the URL for every download. It gets a bit tedious if you have a lot of downloads. Is it possible to have Firefox actually launch the command in a terminal with a button directly from the save dialog box? It would save some time and you could always display the actual command next to the button for copy/pasting, anyway.
So, curl complains with...
curl: (3) [globbing] bad range in column 123
when there are brackets.
Using bash. No idea about zsh or others.
Cliget 2.0.0 doesn't work in Firefox ESR 52.5.0 (64-bit) after plugin automatic upgrade
No errors during installation.
cliget simply does not show up on download modals.
I tried restarting the browser. And reinstalling cliget.
it's great to have curl, wget, youtube-dl or aria2, personally i'm using axel and would be fantastic to have the combo cliget+axel.
(maybe a template for linux like):
axel [URL] --output=[URL] -o $HOME/Downloads
(Sorry for my bad english).
When installed, no configuration is presented in the Addons pane.
Download does not invoke cliget.
No errors shown
I'm running Firefox 21 (canonical 1.0), and recently I've noticed that cliget does not show up either when I right click on a link or when I'm prompted with a "Opening" dialogue. I really have no idea how to debug this problem. Let me know if you need any additional information.
A quick glance through the code makes me think that the extension does not handle cookies at all, though the README suggests that it does pass relevant cookies to cURL, etc. Is this a planned feature?
When downloading a file with an ampersand like this "Random file name with spaces & an ampersand.txt" in the name, the file will be saved as "Random file name &" instead.
Thanks for your effort on this add-on. I have some minor issues with it:
I had trouble understanding how to use it and so had to search for the answer. I found an answer on a comment on stack exchange at:
I suggesting adding some similar verbiage to the description that shows up under the Add-ons Manager within Firefox.
Also, the existing instructions have a slight misspelling at "purcahsed" below which should be "purchased":
Download protected files using curl or wget. This addon will generate curl/wget commands that emulate the request as though it's coming from your browser by sending the same cookies, user agent string and referrer. With this addon you can download email attachments, purcahsed software/media, source code from a private repository to a remote server without having to download the files locally first. This addon should work with any website; if you find a website that cliget doesn't work well with, please let me know.
Thanks!
TrueFX.com requires a free registration, after that .zip downloads are possible. I'm using Firefox and can download files in a usual way, e.g. http://truefx.com/dev/data/2009/NOVEMBER-2009/AUDJPY-2009-11.zip
wget, curl and aria2c all get redirected to index.html, as it would happen in the browser if I weren't signed in to truefx.com and simply tried http://truefx.com/dev/data/2009/NOVEMBER-2009/AUDJPY-2009-11.zip directly.
Below are command lines produced by cliget. (I only shortened cookies with my user id etc before posting it here). For comparison, "Free Download Manager" can download this file when I use it's Firefox add-on. Sure enough, it also gets redirected to index.html when I try adding the URL from above directly.
Any clues where could TrueFX "feel" the difefrence between a browser and wget/curl/aria with cliget command line?
d:\TrueFX>wget --header="Host: truefx.com" --header="Use r-Agent: Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0" --he ader="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - -header="Accept-Language: de,en-US;q=0.7,en;q=0.3" --header="Content-Type: appli cation/x-www-form-urlencoded" --header="Cookie: uid=e9f; oivey=rememberme; _ga=GA1.2.114.147; persistence=%2F %3Fpage%3Ddownload%26description%3Dnovember%26dir%3D2009%2FNOVEMBER-2009" "http: //truefx.com/dev/data/2009/NOVEMBER-2009/EURCHF-2009-11.zip" -c
d:\TrueFX\curl>curl --header "Host: truefx.com" --header "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0 .8" --header "Accept-Language: de,en-US;q=0.7,en;q=0.3" --header "Accept-Encodin g: gzip, deflate" --header "Content-Type: application/x-www-form-urlencoded" --h eader "Cookie: uid=e9f; oivey=rememberme; _ ga=GA1.2.114.147; persistence=%2F%3Fpage%3Ddownload%26description% 3Dnovember%26dir%3D2009%2FNOVEMBER-2009; _gat=1" "http://truefx.com/dev/data/200 9/NOVEMBER-2009/AUDJPY-2009-11.zip" -O -J -L
d:\TrueFX\aria2>aria2c --header "Host: truefx.com" --hea der "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48 .0" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*; q=0.8" --header "Accept-Language: de,en-US;q=0.7,en;q=0.3" --header "Accept-Enco ding: gzip, deflate" --header "Content-Type: application/x-www-form-urlencoded" --header "Cookie: uid=e9f7; oivey=rememberme ; _ga=GA1.2.114.147; persistence=%2F%3Fpage%3Ddownload%26descripti on%3Dnovember%26dir%3D2009%2FNOVEMBER-2009; _gat=1" "http://truefx.com/dev/data/ 2009/NOVEMBER-2009/AUDJPY-2009-11.zip" --async-dns=false --continue=true --file- allocation=none --max-connection-per-server=1
I noticed that this not worked anymore in Firefox 36, so i downgraded to 35, and it's working again.
Am I the only one? Anybody else noticed this?
It stops the browser from using the new multiprocess feature, as reported by the Addon Compatibility Reporter.
First and foremost, thank you for this addon and the time you spend making it.
In the previous version, I was able to get the command to download an entire directory when no file was expressly clicked (accomplished via the context menu, which I understand is no longer available, but mayne if I just click the icon it can read the current URL and offer a link for that url?) and I was also able to add my own options to the generated command via the options (D'Oh! I just found this today in the popout window).
Is there any hope of this feature making it back into the addon?
I believe this is OS independent.
Hi there,
First of all thanks for this tool, it is pretty, pretty cool ! :)
I try to use it to download a lot of files which I have to create an independant curl command for each.
So for now, I click the "download" button for each file, and I see maximum 10 items in the cliget menu. I have then to open a terminal, and copy paste each curl command one by one, and separate them by "&&".
Is is currently possible to simply create an incremental list which would contain each "clicked" item and separate them automatically with && ?
If not, is there a file somewhere where I can find the full history of cliget ? (in the browser, it is really painful to copy paste each item one by one...
Last question, can I also tell cliget to systematically put the following setting "Insecure-Requests:" to 0 instead of 1? (it is not supported by the server i'm downloading from).
Thanks !!!
I've attached patch (as txt at the end of the post) that copies generated command directly to clipboard. The clipboard handling code is not very nice under the current Firefox version but hopefully this will improve in later versions.
I guess that this feature is not for everyone as it forcibly overrides clipboard. A checkbox (somewhere) would be required for mainline. I would like to ask if there is interest in such functionality and if there is a chance that it gets accepted. Also other thoughts like where to possibly enable it are welcome.
It's just clutter for me and unfortunately Menu Wizard isn't able to disable cliget menu entry for some reason.
firefox-58.0.1-1.fc27.x86_64
Fedora 27
cliget installs but nothing else. No icon in the task bar. No diaglog when you download something.
As the subject line says, is it possible to get cliget to handle magnet links when aria2 is the download program selected?
Essentially even aria2c magnet:?...
without options will work.
Thank you
I used this extension before on Firefox pre-Quantum but I don't remember if this extension had an Options button. I just installed this on Firefox 61 now, but it doesn't have an Options button on Firefox 61, when I click on the cliget icon on the toolbar it only displays a drop-down tooltip that says "No downloads for this session."
It also fails to catch any downloads I do, instead they go to the built-in downloader.
I am unable to do anything with the extension now. What's going on?
Hello,
Thanks for porting this to FF 57. Really appreciated.
Works good so far except I some files are not recognized, means cliget does not recognize the download even if the firefox-internal download-window shows up.
Two examples but this might happen with other files as well:
Link to check out these two examples:
http://streamyourfile.com/1k2kxepnrlny (links to a rar-file which contains a pdf, no copyright infringement ;))
and:
https://cdn.loc.gov/master/gmd/gmd4/g4701/g4701g/ct009133.tif (tif file, no copyright infringement either)
Thanks for looking into that.
We had a brief thread about this issue, but I still can't resolve it.
To recap, "Copy curl for page" never includes cookies (nor Referer, I believe), while the component in the save dialog (downloadElement) works as expected.
I'm running FF 19.0.2 on OS X 10.8.2.
I tried these things, but each time got the same behavior:
The other add ons I have installed are:
ABP
Add-on Compatibility Reporter
Dictionary Lookup Extension
Edit Cookies
Export Cookies
FB Purity
Greasemonkey
InheritPrincipal
JSONView
PDF Viewer
QuickJava
RES
Tab Mix Plus
Tamper Data
User Agent Switcher
Web Developer [toolbar]
I tried looking in the browser console but didn't see anything promising. Any hints on how to debug this?
Have you had a look at cliget on Firefox for Android? Seems like it installs, but does not trigger.
In the earlier versions when right clicking on a link i had the option to generate a wget/curl command, this option is no longer there. This was the main way I interacted with this plug-in before.
Is this a bug, or a removed feature due to web-extentions?
I would like to open the cliget GUI from the download Library.
The textbox is not shown on download dialog.
Hello,
Thanks for great FF plugin.
When you navigate to https://www.perforce.com/downloads/visual-merge-tool and select any download option, cliget will fail to recognize it.
After installing/enabling cliget
and restarting Firefox, Ctrl-U
(view Page Source) will show page source using the internal viewer instead of an external editor configured with view_source.editor.{external,path,args}
preferences in about:config
.
Error Console showed the following exception:
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame :: chrome://global/content/viewSourceUtils.js :: gViewSourceUtils.viewSourceProgressListener.onContentLoaded :: line 290" data: no] @ chrome://global/content/viewSourceUtils.js:307
Could you please make an .xpi?
some links will not work without cookies so it would be perfect if it add cookies from which site we download.
Any way for cliget to have its history removed when tagging the Browsing & Download History under the Clear All History menu (ctrl+alt+del)? Or maybe have its own entry or even use another category like under Offline Website Data... I know it has its own clear history button but I keep forgetting to use it :D
I'm using cliget as a shortcut to get the required parameters to scrape urls with auth, and I'm finding myself removing the -O parameter every time to see the output in the console, since the default behavior is to download. I'd appreciate if this could be turned into an option.
When clicking on the save button when viewing a pdf, cliget doen't fire up.
Tested on cliget 1.2.3.1
☠ cat /etc/debian_version
stretch/sid
☠ uname -a
Linux ccfawe 4.4.0-1-amd64 #1 SMP Debian 4.4.6-1 (2016-03-17) x86_64 GNU/Linux
dpkg -l iceweasel
||/ Name Version Architecture Description
+++-===================================-======================-======================-============================================================================
ii iceweasel 45.1.1esr-1 all Web browser based on Firefox - Transitional package
This is a great extension. I really miss it when I'm using FF 57 (Nightly). I willing to help port this to WebExtension, but I wonder is it possible to port, or this is the end of this add on?
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/user_interface
I'd would like a feature to call cliget on the current webpage (that was a feature from legacy).
I will propose a PR to implement it.
When I click a link, there is not cli's in the dialog box. There is no sub-menu in right click menu.
I am sure I make all the configuration right because I know how to get it work on WIndows 7.
(lovely add-on!)
when using curl to get a link you can remove:
that simplifies the generated command line somewhat
I only enable the curl option, and disable the wget option. It would be a nice UX to then, in the specific case when only one program is enabled, to show just that copy option instead of showing a menu with only 1 entry in it.
(Of course, the title could be "Copy wget for the page" for wget only, or for aria. I'm not suggesting always show curl. 😄)
Any plans to release a new version?
Since the upgrade, cliget stopped working entirely.
OS: Debian stretch
FF 52.5.0 (64-bit)
I switched back to 1.x and it fixed the problem
When i try to download http://dfiles.ru/files/hvxh4ymo2
The "Save as" window in FF show without cliget.
I have written a Java Web Gui for curl, this complements with cliget:
https://github.com/weberjn/curlwebmanager
It would be nice, if you wouldn't need to copy&paste, but rather could click a button "send command" in cliget which would do a Post Request to an REST URL given in the options.
The request would correspond to the curl call
curl -X POST -u user:pass http://localhost:8080/curlmgr/curlapi<data>
cliget is very cool.
Please add an option to execute the curl command on another machine. With a pre option that would go before the curl or wget command the download could be submitted to a server.
extra cURL pre options: plink -i myprivate.key.ppk user@host
hello to all who contribute to this project. I have a deep admiration for all.
I look cliget and see something perfect. However there are two functions that I would like to see.
Support for youtube-dl and axel.
youtube-dl is a fantastic client ncurse supporting nearly 100 sites of media.
axel simply boost the speed of downloads.
Well, I hope to see it one day implemented in cliget.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.