RoyalFlyBy / PornHubDownloader

A pornhub.com downloader that allows you to login so you can download everything you have access to. including but not limited to private videos, 1080p or higher resolutions, premium videos and even paid videos that you own.
GNU General Public License v3.0
100 stars 35 forks source link

Error when trying to download videos from a list #1

Closed jxmesth closed 4 years ago

jxmesth commented 5 years ago

When downloading videos from a list, the program gives the following error. I've tried various ways to get this working but it refuses to work. Any help is appreciated :)

C:\Users\Admin\Desktop\D Downloader>PHDownloader.exe -list=listofvids.txt
Not logging in
Getting video for: https://www.pornhub.com/view_video.php?viewkey=xxxxxxxxxxxxx
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x68dcfd]

goroutine 1 [running]:
github.com/anaskhan96/soup.findOnce(0x0, 0xc000447560, 0x1, 0x1, 0x0, 0x746414, 0x13)
        C:/Users/BUNNY/go/src/github.com/anaskhan96/soup/soup.go:338 +0x31d
github.com/anaskhan96/soup.Root.Find(0x0, 0x0, 0x0, 0x7b0020, 0xc000460240, 0xc000447560, 0x1, 0x1, 0x0, 0x0, ...)
        C:/Users/BUNNY/go/src/github.com/anaskhan96/soup/soup.go:121 +0x89
PHDownloader/scraper.(*PHWebClient).GetVideo(0xc000447d70, 0xc00010c000, 0x2e, 0x1, 0x0, 0x2)
        C:/Users/BUNNY/go/src/PHDownloader/scraper/scraper.go:216 +0x30b
main.main()
        C:/Users/BUNNY/go/src/PHDownloader/main.go:140 +0x129c
RoyalFlyBy commented 5 years ago

Hi, thank you for contacting me. Could you confirm the following for me:

I was working on optimizations in the codebase similarly to my chaturbateDownloader scheduled for release by next weekend and I would love for this issue to be fixed in one fell swoop.

jxmesth commented 5 years ago

Hi, thank you for contacting me. Could you confirm the following for me:

  • Issue occurs with more than one link;
  • Issue also occurs when trying to download a single video using the URL flag;
  • The video is working in the browser without logging in.

I was working on optimizations in the codebase similarly to my chaturbateDownloader scheduled for release by next weekend and I would love for this issue to be fixed in one fell swoop.

 

Thank you for your quick reply.  

  • Issue occurs with more than one link;

Yes, no matter what the order of links is in the playlist it gives the same error.

  • Issue also occurs when trying to download a single video using the URL flag;

Nope, downloading a single video using the URL flag works perfectly fine.

  • The video is working in the browser without logging in.

Yes, the video is working fine in the browser without logging in. There is no reCAPTCHA or anything.  

Also, can I just say, Amazing work on making this program, it's awesome!! . This is literally the best and the easiest downloader to use. Thank you so much :)

RoyalFlyBy commented 5 years ago

Okay I have taken a look and rewrote the program with the optimizations that I had planned. I can confirm this issue being present, it is scraping related and I will update the scraping tomorrow or the day after. Sadly I cannot run any tests any further today.

Thank you for the compliments, I will make sure to work on this program to ensure it stays the best phDownloader available.

If you have any ideas as to any features or sites that should be next to be implemented feel free to let me know, I am always in for making a random API that could be useful.

RoyalFlyBy commented 5 years ago

Nevermind, fixed it. Just need to implement 1-2 more features and then I will release an update.

RoyalFlyBy commented 5 years ago

Try latest update when you can and let me know if it worked

jxmesth commented 5 years ago

Try latest update when you can and let me know if it worked

Hmm for some reason it still doesn't work. It gives the following error now:

C:\Users\Admin\Desktop\PornHubDownloader-master>PHDownloader.exe -list=listofvids.txt
[WARNING]:      2019/08/19 16:20:36 Not logging in because of a lack of credentials
[ERROR]:        2019/08/19 16:20:36 Unexpected error: runtime error: invalid memory address or nil pointer 
dereference
RoyalFlyBy commented 5 years ago

Does this still only occur in a list? Run it with --debug=true and sanitize it as needed.

I am going to randomly select a video on ph and post it here in the hopes of being able to get a more accurate testing environment regarding this issue.

https://pornhub.com/view_video.php?viewkey=ph5d10aed974666

This way at least we test the same video(s).

jxmesth commented 5 years ago

Does this still only occur in a list? Run it with --debug=true and sanitize it as needed.

I am going to randomly select a video on ph and post it here in the hopes of being able to get a more accurate testing environment regarding this issue.

https://pornhub.com/view_video.php?viewkey=ph5d10aed974666

This way at least we test the same video(s).

I've just tried downloading a list using --debug=true and it seems to be working fine with this flag. It's weird because when I try running it without the "--debug=true" it fails and gives the error mentioned above. But using the flag it downloads the list without any issues. This is what happens:

C:\Users\Admin\Desktop\PornHubDownloader-master>PHDownloader -list=listofvids.txt 
[WARNING]:      2019/08/19 18:45:10 Not logging in because of a lack of credentials
[ERROR]:        2019/08/19 18:45:10 Unexpected error: runtime error: invalid memory address or nil pointer 
dereference

C:\Users\Admin\Desktop\PornHubDownloader-master>PHDownloader -list=listofvids.txt --debug=true
[WARNING]:      2019/08/19 18:45:20 Not logging in because of a lack of credentials
[DEBUG]:        2019/08/19 18:45:20 Going to visit: https://pornhub.com/view_video.php?viewkey=ph5d10aed974
666
[DEBUG]:        2019/08/19 18:45:20 Extracted view key: ph5d10aed974666
[INFO]: 2019/08/19 18:45:21 Found the video
[DEBUG]:        2019/08/19 18:45:21 Video title: Lei Alfonso SCANDAL PART 2
[DEBUG]:        2019/08/19 18:45:21 Video uploader: hjzs1000
[INFO]: 2019/08/19 18:45:21 Downloading: 720p version
[INFO]: 2019/08/19 18:45:23   transferred 655 kB / 5.9 MB bytes (11.10%)
[INFO]: 2019/08/19 18:45:24   transferred 786 kB / 5.9 MB bytes (13.31%)
[INFO]: 2019/08/19 18:45:25   transferred 868 kB / 5.9 MB bytes (14.70%)
[INFO]: 2019/08/19 18:45:26   transferred 1.0 MB / 5.9 MB bytes (17.75%)
[INFO]: 2019/08/19 18:45:27   transferred 1.2 MB / 5.9 MB bytes (19.69%)
RoyalFlyBy commented 5 years ago

Thanks, I will give it a test right now. I think I know why it's happening.

RoyalFlyBy commented 5 years ago

It should be fixed now.

jxmesth commented 5 years ago

It should be fixed now.

Yup, it seems to be working fine now. Thank you so much for your help :)

RoyalFlyBy commented 5 years ago

No problem, hit me up when you need some more help or have suggestions for future projects.

jxmesth commented 5 years ago

No problem, hit me up when you need some more help or have suggestions for future projects.

Sure thing, thanks once again!!

RoyalFlyBy commented 4 years ago

There was a bug that this issue didn't want to get off of the repository main screen, this fixed it