簡體   English   中英

嘗試使用python腳本發布到w3c驗證器

[英]trying to POST to w3c validator with python script

我正在嘗試使用 python腳本將文件上傳到w3c驗證程序

~/Desktop/urllib2_file$ python test-upload.py -u http://validator.w3.org/ -f ../index.php -n uploaded_file -p Content-Type=text/html > ../results.html && firefox ../results.html

任何幫助將不勝感激!

編輯:

cyraxjoe指出我需要首先通過php運行它。 我嘗試了這個,但是得到了相同的結果:

php -f /opt/lampp/htdocs/index.php > index.html && python urllib2_file/test-upload.py -u http://validator.w3.org/ -f index.html -n uploaded_file -p Content-Type=text/html > results.html && firefox results.html

您要上傳的是服務器端腳本php-script,需要在php處理后上傳生成的html。 也許使用php-cli然后將結果文本存儲在文件中並上傳該文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM