3

I'm trying to block certain URLs while accessing a website. Meaning I only make the requests required to proceed.

There is one url automatically loading a 5 mb code I can't block disabling css by firefox profiles.

I read selenium doesn't allow that amount of control but I'm unsure if there is some way to set it using an addon.

However I'm unable to control block url addon using python.

Is there any way apart from modifying the hosts file? I successfully blocked the urls using network monitor programs but they aren't user friendly at all.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
L4W
  • 31
  • 2

1 Answers1

0

I have not find any means to block directly tru the preferences and options within selenium firefox python. I had to edit windows hosts file, and put domains like 127.0.0.1 domain.com. So It wont bother me.

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/32573304) – n4321d Aug 31 '22 at 02:56