How to output Session variable into text file
I have a scraping session where I pull the league ids from one page
The league token is set as a session variable.
I use a script attached to this to call a second scrape of the detail pages.I have a scraping session where I pull the league ids from one page
The league token is set as a session variable.
I use a script attached to this to call a second scrape of the detail pages. It pulls all of the information from the detail pages and I output them to a file
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
Set objDVDFile = objFSO.OpenTextFile( "wcoffout.txt", 8, True )
' Write out the data to the file.
objDVDFile.Write DataRecord.Get( "team" ) + vbTab
objDVDFile.Write DataRecord.Get( "bid" ) + vbTab
objDVDFile.Write DataRecord.Get( "add" ) + vbTab
objDVDFile.Write DataRecord.Get( "drop" ) + vbTab
objDVDFile.Write vbCrLf
' Close the file and clean up.
objDVDFile.Close
Set objFSO = Nothing
For whatever reason, I cannot get the league session variable to output.
Any thoughts?
How to output Session variable into text file
Hi Ken,
In looking over your script it appears as though you may simply need to add a line to output the value. Try changing your script like this:
' Generate objects to write data to a file.
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
Set objDVDFile = objFSO.OpenTextFile( "wcoffout.txt", 8, True )
' Write out the data to the file.
objDVDFile.Write DataRecord.Get( "team" ) + vbTab
objDVDFile.Write DataRecord.Get( "bid" ) + vbTab
objDVDFile.Write DataRecord.Get( "add" ) + vbTab
objDVDFile.Write DataRecord.Get( "drop" ) + vbTab
objDVDFile.Write vbCrLf
' Close the file and clean up.
objDVDFile.Close
Set objFSO = Nothing
If that doesn't do the trick please feel free to post a reply back.
Kind regards,
Todd Wilson