marcosschroh / pyinstamation

Easy to use, config oriented, instagram bot, written in python 3
GNU General Public License v3.0
11 stars 2 forks source link

Refactor parser #23

Open woile opened 6 years ago

woile commented 6 years ago
  1. Move all the HTML Parsers to it's own class.
  2. Refactor insta_scrapper.py to use the Parser instead of trying directly to retrieve a comment.
  3. Create a new api_tests and write tests for Parser to be run manually
  4. Ignore scrapper from coverage.

e.g: Instead of doing

@property
    def _is_followed(self):
        """Use only after getting a post page somewhere else."""
        button = self.find('xpath', const.FOLLOW_UNFOLLOW_BUTTON, wait=False)
        return button.text == 'Following'

We should do:

@property
    def _is_followed(self):
        """Use only after getting a post page somewhere else."""
        button = self.parser.follow_button()
        return button.text == 'Following'
emilppp commented 6 years ago

We're a group at KTH (https://www.kth.se/en) and would like to help you with this issue

woile commented 6 years ago

Be my guest @emilppp. We are more than glad to receive PR. Are the requirements clear enough?

emilppp commented 6 years ago

Turns out that unfortunately your project is considered too 'small' for us in this course : - ( The requirements/documentation is spot on tho!