Skip to content

Fixing HTML change breakin LIKE and COMMENT - #5296

Merged
timgrossmann merged 16 commits into
InstaPy:masterfrom
eneasz:bugfix/fixing-like-comment_html_change
Jan 28, 2020
Merged

Fixing HTML change breakin LIKE and COMMENT#5296
timgrossmann merged 16 commits into
InstaPy:masterfrom
eneasz:bugfix/fixing-like-comment_html_change

Conversation

@eneasz

@eneasz eneasz commented Jan 21, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@eneasz
eneasz requested a review from breuerfelix January 21, 2020 23:24
@eneasz eneasz mentioned this pull request Jan 21, 2020
@mountainlion0523

mountainlion0523 commented Jan 22, 2020

Copy link
Copy Markdown

it worked, THX!!! X)

Comment thread instapy/xpath_compile.py Outdated
"unlike": "//section/span/button/span[@aria-label='Unlike']",
}
xpath["like_image"] = { "like": "/html/body/div[1]/section/main/div/div/article/div[2]/section[1]/span[1]/button[*[local-name()='svg']/@aria-label='Like']",
"unlike": "/html/body/div[1]/section/main/div/div/article/div[2]/section[1]/span[1]/button[*[local-name()='svg']/@aria-label='Unlike']",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the length of the rows to pass the test

Comment thread instapy/xpath_compile.py Outdated
}
xpath["like_image"] = {
"like": "/html/body/div[1]/section/main/div/div/article/div[2]/section[1]/span[1]/button[*[local-name()='svg']/@aria-label='Like']",
"unlike": "/html/body/div[1]/section/main/div/div/article/div[2]/section[1]/span[1]/button[*[local-name()='svg']/@aria-label='Unlike']",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this row is still too long

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ronmara I've split line in half, some tests have passed some failed. What is the actual requirement that is failing it on 83a3702?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, but try to format the file with black and check the tox.ini file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using a relative path instead of an absolute path
try using:
xpath["like_image"] = { "like": "//section/span/button[*[local-name()='svg']/@aria-label='Like']", "unlike": "//section/span/button[*[local-name()='svg']/@aria-label='Unlike']", }

@ronmara ronmara mentioned this pull request Jan 22, 2020
Damian and others added 7 commits January 22, 2020 19:07
…neasz/InstaPy into bugfix/fixing-like-comment_html_change
…allation failing when it tries to install PyYAML-5.3, and it fails with error message: PyYAML requires Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* but the running Python is 3.4.8
@eneasz

eneasz commented Jan 22, 2020

Copy link
Copy Markdown
Contributor Author

I have decided to remove Python 3.4.8 from tests in .travis.yml as:

  • I don't have it to be able to find out a working version that would be accepted by this and other versions
  • There is no official docker images for this python version for me to experiment with fixing it, therefore, I assume it's obsolete

The fix would be to replace PyYAML>=3.13 in requirements.txt with a working version.

This is the error caused during the build for testing in travis-ci

https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz PyYAML requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*' but the running Python is 3.4.8

Comment thread tox.ini
[testenv]
deps =
-rrequirements.txt
-r requirements.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, is this added space a typo?

@lizozom lizozom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes tested and the fix the issue locally.

@TRiXXER76

Copy link
Copy Markdown

I just updated instapy and to be sure I also edited the code inside the xpath_compile.py

Picture are being liked but comments still not work... I dont even know if hes trying to comment because it just printed "--> not commented" and no error...

@eneasz

eneasz commented Jan 25, 2020

Copy link
Copy Markdown
Contributor Author

I just updated instapy and to be sure I also edited the code inside the xpath_compile.py

Picture are being liked but comments still not work... I dont even know if hes trying to comment because it just printed "--> not commented" and no error...

Comments do work

@eganay

eganay commented Jan 25, 2020

Copy link
Copy Markdown

thank you guys

@timgrossmann

Copy link
Copy Markdown
Collaborator

Working and ready to merge? 😄

@eneasz

eneasz commented Jan 27, 2020

Copy link
Copy Markdown
Contributor Author

Working and ready to merge? 😄

Yes @timgrossmann :)

@timgrossmann
timgrossmann merged commit 95fc624 into InstaPy:master Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants