Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index out of range #3

Closed
malpyon opened this issue Nov 8, 2020 · 9 comments
Closed

index out of range #3

malpyon opened this issue Nov 8, 2020 · 9 comments

Comments

@malpyon
Copy link

malpyon commented Nov 8, 2020

it went smoothly until i got this:

Traceback (most recent call last):
File "F:\Facebook-Friend-Network\facebook.py", line 31, in
driver.find_elements_by_class_name("_6s5d")[0].send_keys(" ")
IndexError: list index out of range

and here's the debug:

[1108/212739.451:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1108/212739.483:ERROR:exception_snapshot_win.cc(99)] thread ID 1080 not found in process
[1108/212739.561:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1108/212739.561:ERROR:exception_snapshot_win.cc(99)] thread ID 8880 not found in process
[1108/213749.417:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)

@JupiLogy
Copy link
Owner

JupiLogy commented Nov 8, 2020

If you search the html of your facebook friends list for _6s5d does it return any results?

@malpyon
Copy link
Author

malpyon commented Nov 8, 2020

it doesn't. so, that's the problem ? how do i fix that ?

@JupiLogy
Copy link
Owner

JupiLogy commented Nov 8, 2020

I guess the version of facebook you have is ahead or before mine :/

You can try replacing _6s5d in the code with whatever shows up in its place in your version of facebook. Here's where it is for me:
image

I suspect that b1v8xokw also isn't in the html of your friends list. This will be harder to find, but here's where it was in my html file:
image

Right next to a link to a list of mutual friends I share with a friend. I hope this helps, but I realise it's a lot of effort.

@malpyon
Copy link
Author

malpyon commented Nov 9, 2020

i can't find it, but i think i know what's the problem, i used another facebook account and it works, the difference between the two are one have the old facebook design and the other have the new one. so i think this code only works with the new one

@JupiLogy
Copy link
Owner

JupiLogy commented Nov 9, 2020

You can try changing the parts in facebook.py according to my previous comment, or you can send me the html to your friends list so I can try and fix it myself? Without being able to see the source html, I can't fix it.

@JupiLogy
Copy link
Owner

JupiLogy commented Nov 9, 2020

Would you mind trying the latest version? I think I've updated it to work with old facebook now, since I was able to revert back to old facebook for a short amount of time. But, while testing, I was given a timeout, so I can't test it any more. It seemed to work, at least. Let me know how it goes

@malpyon
Copy link
Author

malpyon commented Nov 10, 2020

it worked but still got the same index out of range after reaching some point
Capture

Traceback (most recent call last):
File "F:\facebook-friend-network-master2\facebook.py", line 93, in
driver.find_elements_by_class_name(class_vars[0])[0].send_keys(" ")
IndexError: list index out of range

@malpyon
Copy link
Author

malpyon commented Nov 10, 2020

i want to share the html but i dont know how

@JupiLogy
Copy link
Owner

Ah, that means Facebook gave you a timeout as well :/

I'm not sure how to avoid that, unless you want to try increasing the sleep time in the code. Even then, I'm not sure if it will work.

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

No branches or pull requests

2 participants