Electron affinities of the chalcogens and halogens Here are the electron affinities of the 16th and 17th groups.



The general trend for electron affinity down the group is that it decreases because of the increase in atomic radius.The exception of $\ce{Cl}&gt;\ce{F}$, I can understand is because fluorine has a high electron density and it is unfavourable to add more electrons as it would only increase the electron -electron repulsion.

The same reasoning can be applied to $\ce{S}&gt;\ce{O}$. But oxygen's electron affinity is lesser than all the elements down group 16. Why is this so? And how is it so different from group 17 or why doesn't group 17 have $\ce{F}$ being less than the rest?.

I tried to apply the reasoning that the electron-electron repulsion in oxygen is so much that it is less favourable for $\ce{O}$ than any other element in group 16 to gain an electron. But in that case $\ce{F}$ is an even smaller atom hence with even more repulsion. So why are these two groups so different?
The amount of screening is the same in the two groups but the effective positive charge that the incoming electron feels is stronger in Group 7.

For instance, oxygen has the electronic structure of 
$$\ce{1s^{2} 2s^{2} 2p_{x}^{2} 2p_{y}^{1} 2p_{z}^{1}}$$ and 8 protons. The effective positive charge that pulls the incoming electron (which approaches the second level) is $8 - 2 = 6$. 

In fluorine we have,
$$\ce{1s^{2} 2s^{2} 2p_{x}^{2} 2p_{y}^{2} 2p_{z}^{1}}$$ and 9 protons. The effective positive charge is $9 - 2 = 7$.

Therefore, the net pull from Group 7 is stronger than Group 6.