ahaggard2013 / Reddit-Account-Generator-and-Mass-Upvoter

Automatically generate reddit accounts and use them for vote manipulation
65 stars 18 forks source link

Firefox not loading page after visiting permalink #2

Closed yor-mah-daddy closed 7 years ago

yor-mah-daddy commented 7 years ago

[FIXED] Edit: I don't know what I did, but it seems to work now with the permalinks, before Firefox wouldn't load permalinks but that seemed to be a Firefox issue rather than an issue with python. Everything works fine now thanks! Just one question!


What would I alter in the upvoter.py code to turn it into a downvoter.py ?

I assume it's under:

browser.find_element_by_css_selector( ), but what would the new parameters be for locating the downvote button rather than the upvote?

Thank you!

ahaggard2013 commented 7 years ago

Glad you figured it out! If something doesn't click correctly in selenium or you would like to click a different way you can use inspect element in your browser and browser.find_element_by_css_selector() to find that element.

For example on the permalink page you can right click the upvote button>inspect element>right click highlighted section>copy>css selector. and you'll get something like this

div.midcol:nth-child(2) > div:nth-child(1)

For comments I use permalink because depending on where the comment is located on a page the css selector will change. Through permalink it will always be located in the same spot.