Python script to download stack overflow question and answer in pdf format Install the required dependencies using
pip install -r requirements.txt
Run the program by
python stack-overflow.py
Enter the url, press space and then hit enter.
Enter the url, press space and then hit Enter: https://stackoverflow.com/questions/7327056/appending-html-string-to-the-dom?noredirect=1&lq=1
The file will be downloaded on the same directory.
I have included the pdf file that is generated by running this program.