0

My requirement is to pass the mcode to the below web aspx query and then print the resultant webpage to a pdf.

https://wwww.abcd.com/xyz/subject.aspx?mcode=99999

In the above url, the only variable is 99999. So my objective is to pass the mcode each time and then print the resultant aspx page to pdf. Please pardon my simplified language as I'm new to this.

1 Answers1

0
  1. Use urllib to get the page like here, use the url as you posted it.
  2. Use https://weasyprint.org/ to print html to pdf
  3. This has nothing to do with scraping. Scraping is the process of parsing and further processing contents of a webpage. If you want that, search for beautifulsoup4 python package
trwk
  • 303
  • 2
  • 8
  • Thanks a lot sir. I’m a complete newbie into this. Could you give me the exact code in Python which will allow me to pass mcode with the url and print the resultant asxp page to pdf. – Dipan Kumar Rout Mar 17 '20 at 23:04
  • If you only want to print a webpage to pdf install weazyprint and execute following commanda as described [here](https://weasyprint.readthedocs.io/en/stable/tutorial.html): `weasyprint https://wwww.abcd.com/xyz/subject.aspx?mcode=99999 yourpdf.pdf` You wont need any programming at all. – trwk Mar 18 '20 at 23:49