Comments (12)
long post incoming :/
$ curl 'https://stackexchange.com/sites?view=list' | grep -P 'https://[a-z0-9]+.stackexchange.com' -o | uniq
https://webapps.stackexchange.com
https://gaming.stackexchange.com
https://webmasters.stackexchange.com
https://cooking.stackexchange.com
https://gamedev.stackexchange.com
https://photo.stackexchange.com
https://stats.stackexchange.com
https://math.stackexchange.com
https://diy.stackexchange.com
https://gis.stackexchange.com
https://tex.stackexchange.com
https://money.stackexchange.com
https://english.stackexchange.com
https://ux.stackexchange.com
https://unix.stackexchange.com
https://wordpress.stackexchange.com
https://cstheory.stackexchange.com
https://apple.stackexchange.com
https://rpg.stackexchange.com
https://bicycles.stackexchange.com
https://softwareengineering.stackexchange.com
https://electronics.stackexchange.com
https://android.stackexchange.com
https://boardgames.stackexchange.com
https://physics.stackexchange.com
https://homebrew.stackexchange.com
https://security.stackexchange.com
https://writers.stackexchange.com
https://video.stackexchange.com
https://graphicdesign.stackexchange.com
https://dba.stackexchange.com
https://scifi.stackexchange.com
https://codereview.stackexchange.com
https://codegolf.stackexchange.com
https://quant.stackexchange.com
https://pm.stackexchange.com
https://skeptics.stackexchange.com
https://fitness.stackexchange.com
https://drupal.stackexchange.com
https://mechanics.stackexchange.com
https://parenting.stackexchange.com
https://sharepoint.stackexchange.com
https://music.stackexchange.com
https://sqa.stackexchange.com
https://judaism.stackexchange.com
https://german.stackexchange.com
https://japanese.stackexchange.com
https://philosophy.stackexchange.com
https://gardening.stackexchange.com
https://travel.stackexchange.com
https://productivity.stackexchange.com
https://crypto.stackexchange.com
https://dsp.stackexchange.com
https://french.stackexchange.com
https://christianity.stackexchange.com
https://bitcoin.stackexchange.com
https://linguistics.stackexchange.com
https://hermeneutics.stackexchange.com
https://history.stackexchange.com
https://bricks.stackexchange.com
https://spanish.stackexchange.com
https://scicomp.stackexchange.com
https://movies.stackexchange.com
https://chinese.stackexchange.com
https://biology.stackexchange.com
https://poker.stackexchange.com
https://mathematica.stackexchange.com
https://cogsci.stackexchange.com
https://outdoors.stackexchange.com
https://martialarts.stackexchange.com
https://sports.stackexchange.com
https://academia.stackexchange.com
https://cs.stackexchange.com
https://workplace.stackexchange.com
https://windowsphone.stackexchange.com
https://chemistry.stackexchange.com
https://chess.stackexchange.com
https://raspberrypi.stackexchange.com
https://russian.stackexchange.com
https://islam.stackexchange.com
https://salesforce.stackexchange.com
https://patents.stackexchange.com
https://genealogy.stackexchange.com
https://robotics.stackexchange.com
https://expressionengine.stackexchange.com
https://politics.stackexchange.com
https://anime.stackexchange.com
https://magento.stackexchange.com
https://ell.stackexchange.com
https://sustainability.stackexchange.com
https://tridion.stackexchange.com
https://reverseengineering.stackexchange.com
https://networkengineering.stackexchange.com
https://opendata.stackexchange.com
https://freelancing.stackexchange.com
https://blender.stackexchange.com
https://space.stackexchange.com
https://sound.stackexchange.com
https://astronomy.stackexchange.com
https://tor.stackexchange.com
https://pets.stackexchange.com
https://ham.stackexchange.com
https://italian.stackexchange.com
https://aviation.stackexchange.com
https://ebooks.stackexchange.com
https://alcohol.stackexchange.com
https://softwarerecs.stackexchange.com
https://arduino.stackexchange.com
https://expatriates.stackexchange.com
https://matheducators.stackexchange.com
https://earthscience.stackexchange.com
https://joomla.stackexchange.com
https://datascience.stackexchange.com
https://puzzling.stackexchange.com
https://craftcms.stackexchange.com
https://buddhism.stackexchange.com
https://hinduism.stackexchange.com
https://communitybuilding.stackexchange.com
https://startups.stackexchange.com
https://worldbuilding.stackexchange.com
https://emacs.stackexchange.com
https://hsm.stackexchange.com
https://economics.stackexchange.com
https://lifehacks.stackexchange.com
https://engineering.stackexchange.com
https://coffee.stackexchange.com
https://vi.stackexchange.com
https://musicfans.stackexchange.com
https://woodworking.stackexchange.com
https://civicrm.stackexchange.com
https://health.stackexchange.com
https://rus.stackexchange.com
https://mythology.stackexchange.com
https://law.stackexchange.com
https://opensource.stackexchange.com
https://elementaryos.stackexchange.com
https://portuguese.stackexchange.com
https://computergraphics.stackexchange.com
https://hardwarerecs.stackexchange.com
https://3dprinting.stackexchange.com
https://ethereum.stackexchange.com
https://latin.stackexchange.com
https://languagelearning.stackexchange.com
https://retrocomputing.stackexchange.com
https://crafts.stackexchange.com
https://korean.stackexchange.com
https://monero.stackexchange.com
https://ai.stackexchange.com
https://esperanto.stackexchange.com
https://sitecore.stackexchange.com
https://iot.stackexchange.com
https://literature.stackexchange.com
https://vegetarianism.stackexchange.com
https://ukrainian.stackexchange.com
https://devops.stackexchange.com
https://bioinformatics.stackexchange.com
https://cseducators.stackexchange.com
https://meta.stackexchange.com
It seems making these vars dynamic will do the job.
Only socli.userpage
require to be 'refactored' nah ?
from socli.
@gautamkrishnar, @arount - I'm pretty sure that classes are not the same between sites. For example, looking at the top nav bar alone on Stack Overflow, it uses classes like "navigation"; on other sites like Physics, it uses classes like "topbar-icon" and so on. Which classes need to be the same?
from socli.
Looking at the question pages, their structure seems to be fairly similar, and the classes for the question content seem to be the same. Now that I think about it, the Stack Overflow nav bar was recently redesigned, so the different classes could be related to that and nothing else.
from socli.
I'm working on a way to make the vars already specified dynamic - I think I have a decent solution that'll also allow for easy updating when new sites are added to the network; I'll let you know when it's finished.
from socli.
I've got the solution now:
import re
siteslst = {}
with open('sites.txt', 'r') as s:
data = s.read()
data = data.splitlines()
for i in data:
keyVal = re.search(r'(\w+)\.',str(i)).group(1)
siteslst[str(keyVal)] = str(i)
testInput = siteslst.keys()
print('Sites: ', ', '.join(testInput), '\n')
validInput = False
while validInput == False:
searchSite = input("which site would you like to search? ")
if searchSite in testInput:
url = siteslst[searchSite]
urlSearch = siteslst[searchSite]+'/search?q='
validInput = True
else:
validInput = False
Along with a text file containing all the site links. Run it here to test it.
I forked socli already, but it's not at all up to date with recent commits and also has some code working on a separate issue. How do you want it to be added? Should I fork the repository again?
from socli.
@gautamkrishnar yep, I can wait until the next release - I'll keep an eye on that branch for it. Thanks for your help!
from socli.
Sounds like a good idea... We can create seporate program named secli
for this... I am not planning to expand socli to other stackexchange sites, since it is only intented to make stackoverflow search easier.
from socli.
The main problem is that their are hundreds of stackexchange sites.... 😄
from socli.
@arount yes... Just modifying the query vriable is required... are u sure that all the stackexchange sites use the same HTML classes on the code?
from socli.
@gautamkrishnar Ho, I did not even think about it ^^.
Did you want I make you a kind of poc about that ?
from socli.
@physicsnerd We have a few developments going on the Develop branch. You can fork a fresh version if you want. Can you please wait till the next release so that we can manage this big change?.
from socli.
Lets keep this issue on hold for sometime. We have some pending feature implementations. Will reopen once ready.
from socli.
Related Issues (20)
- README enhancement HOT 3
- Adding DWOC lables beside the issues. HOT 2
- the search is broken for me HOT 10
- Incorrect tag for 6.3 release ? HOT 2
- Facing captchas even after adding my own Api Key HOT 1
- Proposing a PR to fix a few small typos HOT 2
- Google made a change in the search description which breaks Socli search HOT 1
- no result found HOT 4
- Non-interactive mode HOT 2
- back command doesn't work as expected in interactive mode HOT 5
- AttributeError: module 'collections' has no attribute 'MutableMapping' HOT 1
- Create better documentation HOT 1
- Needs maintainers
- "Please check your internet connectivity" error
- Google searches always return No results found... HOT 1
- How to copy or execute results? HOT 1
- More key bindings in answer viewer: `less` mode, `?` for help, ...
- Add `tldr` page for `socli` HOT 1
- python3.11 breaks socli HOT 2
- Copy Answer Text to Clipboard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socli.