Skip to content

Instantly share code, notes, and snippets.

@yamanjain
yamanjain / Intercept_header.py
Created March 27, 2024 09:41
Python code to capture outgoing header to be re-used for scraping
# Some flaw in python code due to which things are intercepted only after clicking twice / two requests
def get_intercepted_header(page):
global intercepted_header
global intercepted_auth_token
# URL that is called in the request
page.route("**/customeraccounts", handle)
# Click the link which sends out a request
page.get_by_text("Check Balance").click()
# page.route("**/*", handle)
@yamanjain
yamanjain / Stock_Items.xml
Created March 27, 2024 09:17
XML code to get all inventory master detail from Tally Prime
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export Data</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<REPORTNAME>List of Accounts</REPORTNAME>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>