whats-happening-rightnow / justfor.fans.ripper

22 stars 16 forks source link

Index out of Range? #6

Open mm125Y opened 2 years ago

mm125Y commented 2 years ago

I keep getting this error: File "P:\justfor.fans.ripper-main\justfor.fans.ripper-main\app.py", line 150, in parse_and_get(html_text) File "P:\justfor.fans.ripper-main\justfor.fans.ripper-main\app.py", line 114, in parse_and_get video_save(thispost) File "P:\justfor.fans.ripper-main\justfor.fans.ripper-main\app.py", line 68, in video_save vidurljumble = vpost.post_soup.select('div.videoBlock a')[0].attrs['onclick'] IndexError: list index out of range

anyway to fix this?

ulfbearth commented 1 year ago

same

stelladraco27 commented 1 year ago

I fixed this issue by opening JFF in an incognito tab, basically clearing its data, and getting the auth tolken again. Best guess is that the tolken expires after some time. This fixed the issue for me. There is a bug in the photo downloading function though, I have a fix for that if you are interested.

nstern2 commented 1 year ago

Please share any fixes you have.

stelladraco27 commented 1 year ago

I made a fork here. Download it and use it the same way. I made some changes that:

His code is alright, but he has literally 0 comments, it was and is mega hard to figure out lmao, so i'd really need some support if you want a rewrite or smthn.

Only known "bug" that I really won't care to fix because I no longer have a subscription I need to rip is that multi-posts (ones that have multiple images and videos) get saved to separate folders (One for images, one for videos), this creates some clutter. I wont fix it because I no longer have a subscription to rip. If that's an issue you want me to deal with I'd fix it if I get some cash or some IDs and hashes (Basically let me rip your stuff for development purposes lol, or just share anyways because I like free corn, I won't judge what kind it is XD).

Anyways, hope the fix helps.

deifilippo commented 1 year ago

Ciao Stelladraco27. i have used your fork and is really better of this (sorry if i use this place for talk with you but in your fork i don't find any issue place or contact info about you) unfortunatly i receive error from your fork at one point of scraping:

VIDEO ... v: <>: D:\Rip\Tatiana Hilton\video\63_2022-06-08_2022-06-08.mp4 t: <>: D:\Rip\Tatiana Hilton\video\63_2022-06-08_2022-06-08.txt ......... PHOTO ... img: p: D:\Rip\Tatiana Hilton\photo\64_2022-06-08.01_2022-06-08.jpg img: p: D:\Rip\Tatiana Hilton\photo\64_2022-06-08.02_2022-06-08.jpg img: p: D:\Rip\Tatiana Hilton\photo\64_2022-06-08.03_2022-06-08.jpg Traceback (most recent call last): File "C:\Users\Filippo\Downloads\ripper-main\ripper-main\app.py", line 225, in parse_and_get(html_text) File "C:\Users\Filippo\Downloads\ripper-main\ripper-main\app.py", line 194, in parse_and_get photo_save(thispost) File "C:\Users\Filippo\Downloads\ripper-main\ripper-main\app.py", line 98, in photo_save r = requests.get(img[1]) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Filippo\AppData\Roaming\Python\Python311\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Filippo\AppData\Roaming\Python\Python311\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Filippo\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 528, in request prep = self.prepare_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Filippo\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 456, in prepare_request p.prepare( File "C:\Users\Filippo\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 316, in prepare self.prepare_url(url, params) File "C:\Users\Filippo\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 390, in prepare_url raise MissingSchema(error) requests.exceptions.MissingSchema: Invalid URL '/images/blur6.jpg': No schema supplied. Perhaps you meant http:///images/blur6.jpg? PS C:\Users\Filippo\Downloads\ripper-main\ripper-main>

Can you help me? thanks a lot

stelladraco27 commented 11 months ago

@deifilippo Unfortunately since I do not have an active subscription, nor anyone to provide me their API token, I have no way to test/develop my code any longer.