This question is rather for Desktop area, but still \
First, you have to choose large value for visited sites : Edit -> Preferences -> Privacy : Remember visited pages for the last 10000 days.
Then, the history file is usually located at $HOME/.mozilla/firefox/nls7xpyr.default/ - the file is called "history.dat" - it contains everything. You can roughly cat the file and grep for http string, or you can use a script, located
here to extract relevant information. Someone else has had the same need, and wrote a script for that, I hope it works.