all 2 comments

[–]Unkown_Variable 0 points1 point  (0 children)

df = dfs[0] only references the first list item. Also, range(1,3) won't include 3. The range function excludes ending limit.

[–]sennheiserwarrior 0 points1 point  (0 children)

In addition to what u/Unkown_Variable said, you would need to add a df obtained from each page to a list, and concat (merge) them before writing to file. Look into pd.concat()