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

能支持显示大辞海网站么? #60

Open
tonylu01 opened this issue Mar 31, 2024 · 5 comments
Open

能支持显示大辞海网站么? #60

tonylu01 opened this issue Mar 31, 2024 · 5 comments

Comments

@tonylu01
Copy link

tonylu01 commented Mar 31, 2024

小白一个,照抄了一个,但发现在运行popweb-dict-dacihai-pointer的时候不能进行传参,即不能将选中的字符传入url中的%s。

(popweb-dict-create "dacihai"
                    "http://www.dacihai.com.cn/search_index.html?_st=1&keyWord=%s"
                    (concat
                     "window.scrollTo(0, 0); "
                     "document.getElementsByTagName('html')[0].style.visibility = 'hidden'; "
                     "document.getElementsByClassName('seach_left pr')[0].style.visibility = 'hidden'; "
                     "document.getElementsByClassName('normal')[0].style.visibility = 'visible'; "
                     "document.querySelector('body > .w.clearfix').style.visibility = 'visible'; "
                     "document.querySelector('body > .w.clearfix').style.margin = '0'; "
                     "document.querySelector('body > .w.clearfix').style.padding = '0'; "
                     "document.querySelector('.sidebar.fl').style.width = '30%'; "
                     "document.querySelector('.main.fr.serach_right_new').style.width = '40%'; "
                     ))

请大神帮忙看下

@manateelazycat
Copy link
Owner

最近比较忙, 有空帮你看一下, 请理解。

@tonylu01
Copy link
Author

tonylu01 commented Apr 5, 2024

没事,感谢

@manateelazycat
Copy link
Owner

我稍微看了一下, 感觉是这个网站有JS代码在做防御, 如果你用浏览器正常访问连接没问题, 但是用外部插件去访问连接, 它什么单词都不查询。

@tonylu01
Copy link
Author

tonylu01 commented Apr 5, 2024

我稍微看了一下, 感觉是这个网站有JS代码在做防御, 如果你用浏览器正常访问连接没问题, 但是用外部插件去访问连接, 它什么单词都不查询。

有没有比较简单方法能解决这个问题?不用Selenium来模拟真实的浏览器环境能不能解决这个问题呢

@manateelazycat
Copy link
Owner

manateelazycat commented Apr 5, 2024

不好意思,最近没有时间研究我不用的功能,欢迎发送补丁

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