Skip to content Skip to sidebar Skip to footer

Why Does This Code Generate Multiple Files? I Want 1 File With All Entries In It

Im trying to work with both beautifulsoup and xpath and was trying to using the following code, but now im getting 1 file per URL instead of before where i was getting 1 file for a

Solution 1:

You create a new filename with timestamp for each run:

filename = 'dsg-%s.csv' % str(int(now))

Just replace it with:

filename = 'dsg.csv'

Post a Comment for "Why Does This Code Generate Multiple Files? I Want 1 File With All Entries In It"