snoopcatt |
|
Темы:
33
Сообщения:
286
Участник с: 16 января 2010
|
возможно? как? например для скачивания музыки\видео с каких-нибудь ресурсов типа VK прямо из консоли (bash-скриптом) где-то читал, что надо отправить запрос с логином\паролем, но как? |
legioner |
|
Темы:
14
Сообщения:
102
Участник с: 02 марта 2010
|
wget –help Сам разберёшься или на пальцах объяснить? |
snoopcatt |
|
Темы:
33
Сообщения:
286
Участник с: 16 января 2010
|
маны читать умею. пока получилось только залогинитса – wget http://vk.com/login.php -oO /dev/null –post-data “email=$login&pass=$password”. но например wget http://vk.com/gsearch.php?section=audio итд. не получаетса. заного просит авторизацию.. |
legioner |
|
Темы:
14
Сообщения:
102
Участник с: 02 марта 2010
|
Попробуй вот это: wget –http-user=username –http-pass=password DownloadURL1 DownloadURL2 DownloadURL… Некоторые сайты настроены и требуют не –http-pass ,а –http-password |
snoopcatt |
|
Темы:
33
Сообщения:
286
Участник с: 16 января 2010
|
не то все равно… но зато йа уже знаю как получать аудиозаписи со своей страницы, и уже работает – [neko@gdetotut ~]$ ./vk search Login successful There are 4 audio files in your VK page... Done. Links saved in /home/neko/vks/gsearch_temp. \\пс. как качать с сайтов, требующих http-auth йа знаю..на контактиках etc. все подругому.. |
legioner |
|
Темы:
14
Сообщения:
102
Участник с: 02 марта 2010
|
Ну извини… Тогда покури маны к curl Вот то,чем я пользовался: USING PASSWORDS FTP To ftp files using name+passwd, include them in the URL like: curl ftp://name:passwd@machine.domain:port/full/path/to/file or specify them with the -u flag like curl -u name:passwd ftp://machine.domain:port/full/path/to/file FTPS It is just like for FTP, but you may also want to specify and use SSL-specific options for certificates etc. Note that using FTPS:// as prefix is the "implicit" way as described in the standards while the recommended "explicit" way is done by using FTP:// and the --ftp-ssl option. SFTP / SCP This is similar to FTP, but you can specify a private key to use instead of a password. Note that the private key may itself be protected by a password that is unrelated to the login password of the remote system. If you provide a private key file you must also provide a public key file. HTTP Curl also supports user and password in HTTP URLs, thus you can pick a file like: curl http://name:passwd@machine.domain/full/path/to/file or specify user and password separately like in curl -u name:passwd http://machine.domain/full/path/to/file HTTP offers many different methods of authentication and curl supports several: Basic, Digest, NTLM and Negotiate. Without telling which method to use, curl defaults to Basic. You can also ask curl to pick the most secure ones out of the ones that the server accepts for the given URL, by using --anyauth. NOTE! Since HTTP URLs don't support user and password, you can't use that style when using Curl via a proxy. You _must_ use the -u style fetch during such circumstances. HTTPS Probably most commonly used with private certificates, as explained below. PROXY Get an ftp file using a proxy named my-proxy that uses port 888: curl -x my-proxy:888 ftp://ftp.leachsite.com/README Get a file from a HTTP server that requires user and password, using the same proxy as above: curl -u user:passwd -x my-proxy:888 http://www.get.this/ Some proxies require special authentication. Specify by using -U as above: curl -U user:passwd -x my-proxy:888 http://www.get.this/ A comma-separated list of hosts and domains which do not use the proxy can be specified as: curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/ If the proxy is specified with --proxy1.0 instead of --proxy or -x, then curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts. curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5. See also the environment variables Curl support that offer further proxy control. |
amigo |
|
![]()
Темы:
35
Сообщения:
2126
Участник с: 05 февраля 2007
|
А сессию не надо сохранять?)
Разберемся, голубчик!
|
snoopcatt |
|
Темы:
33
Сообщения:
286
Участник с: 16 января 2010
|
и как же это сделать? (: |
Nebulosa |
|
![]()
Темы:
9
Сообщения:
915
Участник с: 05 марта 2009
|
Вдумчиво и внимательно читать ман wget, особенно часть про cookies |
snoopcatt |
|
Темы:
33
Сообщения:
286
Участник с: 16 января 2010
|
спасибо (: –save-cookie=$cookie а потом –load-cookie=$cookie. itworks! ^_^ |