Finished working on the offset and other things

The offsetting now works and the script terminates when there aren't
any more entries to extract.

In addition, the script now takes URLs from the command line interface.
just a safety commit
starting file writing