Welcome folks today in this blog post we will be downloading full source code
of website including the html,css
and js files using pywebcopy
library in command line. All the full source code of the application is shown below.
Get Started
In order to get started you need to install the below libraries using the pip
command as shown below
pip install pywebcopy
After that you need to make an app.py
file and copy paste the following code
app.py
1 2 3 |
from pywebcopy import save_webpage save_webpage(url="https://www.rapidtables.com/calc/time/age-calculator.html",project_folder="C:\\Users\\westi\\OneDrive\\Desktop\\projects\\media\\views\\sourcecode",project_name="my_site",bypass_robots=True,debug=True,open_in_browser=True,delay=None,threaded=False) |
As you can see in the above python code we are importing the pywebcopy
package and from this we are using the save_webpage()
method to download the source code of the web url
that you passed. And in the second argument we are passing the project_folder
which is basically the path
of the project location. Then we are passing the project_name