2013-01-18 2 views
1

시스템 정보 차단되고 : 윈도우 7, 1.11.4 GNU를 Wget, 파이썬 2.6창은 wget &

문제 :

임은 wget과 바로 가기를 발생시키는 파이썬 스크립트를 실행하여 문제를 wget (exe에서 명령 줄에서 순전히 실행되는 경우에도)은 '&'을 차단합니다. 당신이 볼 수 있듯이

C:\Program Files\GnuWin32\bin>wget.exe http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_type=feature

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc

--2013-01-18 12:48:43-- http://www.imdb.com/search/title?genres=action Resolving www.imdb.com... 72.21.215.52 Connecting to www.imdb.com|72.21.215.52|:80... failed: Connection refused.

=alpha,ascThe system cannot find the file specified.

The system cannot find the file 51. 'title_type' is not recognized as an internal or external command, operable program or batch file.

은 wget과 카운트가 모든 문제의 URL로 '&'이전 텍스트, 창문이로 후반을 : 나는 아래의 코드를 실행할 때 예를 들어, 내가 무엇을 얻을 새로운 명령.

wget이 전체 문자열을 URL로 캡처 할 수있는 방법이 있어야합니다.

미리 감사드립니다.

편집 : 나는 주위 브래킷 명령 줄에서 명령을 호출 할 때, 큰, 그러나, 작동 파이썬을 통해 스크립트를 실행하면

subprocess.Popen(['start /B wget.lnk --directory-prefix=' + output_folder + ' --output-document=' + output_folder + 'this.html "http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_type=feature"'], shell=True) 

나는 다음과 같은 오류 얻을 :

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc

syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc

"http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_ty pe=feature": Unsupported scheme.

답변

1

URL을 차단하는 것은 Wget이 아니지만, ;과 비슷한 두 개의 명령을 구분하기 위해 &을 사용하는 명령 인터프리터입니다. 이것은 다음 행의 =alpha,ascThe system cannot find the file specified. 오류로 표시됩니다.

가 발생하지 않도록 전체 URL 인용 :

wget.exe "http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_type=feature" 
+0

감사합니다 친구, 지금 파이썬에서 떨어져 걷어차는 한 유일한 문제를 – user1747683