on python indent
Python indent seems an easy syntax. If you use the same number of spaces/tabs(don’t mix spaces and tabs) for code lines in the same block, you’ll have no problem. That […]
Python indent seems an easy syntax. If you use the same number of spaces/tabs(don’t mix spaces and tabs) for code lines in the same block, you’ll have no problem. That […]
Since Instagram uses our privacy to make money, we’d better create some bots to fuck this bitch. To write an instagram bot, the first issue we’ll encounter is how to […]
requests library is a powerful python package for http. You can use it to fetch web pages, and do anything as the http verbs can do. To use requests, install […]
import can be used independently: import module import package It can be used to import a module, a package, or . concated module/packages. import package.module import package1.package2 import package1.package2.module But […]
I often got confused about JSON and JSON string. JSON is the code you write in your javascript script to represent an object, so the code is called JavaScript Object […]
If you use php curl to scrape web page, the retrieved content may be in compressed format,i.e., the Content-Encoding http response header may have the value “gzip”. How to uncompress […]
We know that we can customize http headers for php curl using CURLOPT_HTTPHEADER. But if we do not add additional headers, what http headers does curl send by default? In […]
I encountered a strange problem of php curl. I use curl to fetch a remote web page as follows: $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, “https://myprogrammingnotes.com”); curl_setopt($curl, CURLOPT_HEADER,1); curl_setopt($curl, CURLOPT_FRESH_CONNECT,1); curl_setopt($curl, […]
php curl is often used to fetch remote content. Sure you can use file_get_content to fetch remote web pages. But curl has more options to choose. We know that http […]
To debug .php web pages, you want to print something on the browser’s windows when opening the web pages. You can use the php echo or print function to display […]