alexch33/super-video-downloader

Facebook not working when DesktopMode is OFF

Opened this issue · 3 comments

here, I face a problem that if I set DestopMode = false; means for Mobile mode download not working (especially for Facebook); video not added to list for download due to detected video format not supported

here, I face a problem that if I set DestopMode = false; means for Mobile mode download not working (especially for Facebook); video not added to list for download due to detected video format not supported

@Farhan-Occess24 i faced too but only for facebook(for me facebook in mobile mode not working at all and this is looks like webview issue, but i think it should be investigated), but all another sites work well, could you provide more info? What unsupported video format? where is not videos undetected in mobile mode? and what android version?

@alexch33
Ya! its working for other (like: dailymotion) in Mobile Mode,
from last week, facing issue; before it, whole going well with both Mobile and Desktop mode;

can you please suggest any solution for facebook videos

got in logCat:
YoutubeDL Error: com.yausername.youtubedl_android.YoutubeDLException: WARNING: [generic] Falling back on generic information extractor
WARNING: [generic] Falling back on generic information extractor
ERROR: Unsupported URL: https://mbasic.facebook.com/?wbltns

In DetectedVideosTabViewModel:
override fun showVideoInfo() {
ShowAppLog.d("SHOW")

    val state = downloadButtonState.get()

    if (state is DownloadButtonStateCanNotDownload) {
        webTabModel?.getTabTextInput()?.get()?.let {
            if (it.startsWith("http")) {
                viewModelScope.launch(executorRegular) {
                    onStartPage(
                        it.trim(),
                        webTabModel?.userAgent?.get() ?: BrowserFragment.MOBILE_USER_AGENT
                    )
                }
            }
        }
    }

    if (detectedVideosList.get()?.isNotEmpty() == true) {

        Log.d("Detected_Video", "DetectedVideos")
        showDetectedVideosEvent.call()
    } else 
        Log.d("Detected_Video", "DetectedVideos -- list empty")
}

logCat: show 'DetectedVideos -- list empty'

In VideoService:
override fun getVideoInfo(url: Request): VideoInfoWrapper? {
ShowAppLog.d("Getting info url...: $url ${url.headers["Cookie"]}")

    var result: VideoInfoWrapper? = null

    try {
        val isM3u8 = url.url.toString().contains(M3U8_EXT, true)
        val isHentaiHavenM3u8 = url.url.toString().contains(TXT_EXT, true)
        val isMpd = url.url.toString().contains(MPD_EXT, true)
        result = if (isM3u8 || isHentaiHavenM3u8 || isMpd) {
            handleYoutubeDlUrl(url, true)
        } else {
            handleYoutubeDlUrl(url)
        }
    } catch (e: Throwable) {
        ShowAppLog.d("YoutubeDL Error: $e")
    }

    ShowAppLog.d("result:  "+result.toString())

    return result
}

logCat: YoutubeDL Error: com.yausername.youtubedl_android.YoutubeDLException: ERROR: [facebook] 1046883943772011: Cannot parse data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
result: null

@Farhan-Occess24 I fully reproduce your issue for facebook(facebook just start loading in mobile mode, before it did't loaded) But video detection not working for facebook in mobile mode, i got error same as yt-dlp opened issue, all you need is just wait when it will be fixed(in app youtube-dlp library auto updating on start) if you want you could try to change youtube-dlp library update branch from YoutubeDL.UpdateChannel.MASTER to YoutubeDL.UpdateChannel.NIGHTLY in DLApplication class, updateYoutubeDL method