I want to scrap the contents of LinkedIn using requests and bs4 but I'm facing a problem with the JavaScript that is loading the page after I sign in(I don't get the home page directly), I don't wanna use Selenium
here is my code
import requests
from bs4 import BeautifulSoup
class Linkedin():
def __init__(self, url ):
self.url = url
self.header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"}
def saveRsulteToHtmlFile(self, nameOfFile=None):
if nameOfFile …
Run Code Online (Sandbox Code Playgroud) 我想将此 Timestamp 对象转换为日期时间 该对象是在数据帧上使用 asfreq 后获得的,这是最后一个索引
Timestamp('2018-12-01 00:00:00', freq='MS')
<class 'pandas._libs.tslibs.timestamps.Timestamp'>
Run Code Online (Sandbox Code Playgroud)
想要的输出
2018-12-01
Run Code Online (Sandbox Code Playgroud) 我有一个看起来像这样的数据框
AUX TER
11/2014 2.0 10.0
01/2015 23.0 117.0
03/2015 57.0 65.0
04/2015 1.0 1.0
05/2015 16.0 20.0
07/2015 19.0 30.0
Run Code Online (Sandbox Code Playgroud)
我想用0填充不在数据框中的月份值
AUX TER
11/2014 2.0 10.0
12/2014 0 0
01/2015 23.0 117.0
03/2015 57.0 65.0
04/2015 1.0 1.0
05/2015 16.0 20.0
06/2015 0 0
07/2015 19.0 30.0
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 pyinstaller 从这个脚本中获取 .exe 文件
我在测试目录中时使用了这个命令pyinstaller -w -F test.py
文件 test.py 包含
from tkinter import *
from tkcalendar import DateEntry
root = Tk()
date = DateEntry(root, year=2001, month=11, day=11, width=17,)
date.pack()
root.mainloop()
Run Code Online (Sandbox Code Playgroud)
我得到的 .exe 文件不起作用?
当我执行此pyinstaller -F test.py 时,我收到控制台上没有名为 babel.numbers 的模块的错误