File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 148148 "outputs" : [],
149149 "source" : [
150150 " # An example of using dictionaries.\n " ,
151- " _COLUMNS = {\" count_of_employees\" : \" size_emp\" }\n " ,
151+ " COLUMNS = {\" count_of_employees\" : \" size_emp\" }\n " ,
152152 " \n " ,
153- " firmyear = firmyear.rename(columns=_COLUMNS )"
153+ " firmyear = firmyear.rename(columns=COLUMNS )"
154154 ]
155155 },
156156 {
Original file line number Diff line number Diff line change 211211 " # Note: when in doubt, get everything you might possibly use.\n " ,
212212 " # It's easier to drop stuff than to re-scrape everything.\n " ,
213213 " \n " ,
214- " _METAS = [\n " ,
214+ " METAS = [\n " ,
215215 " \" article:published_time\" ,\n " ,
216216 " \" article:modified_time\" ,\n " ,
217217 " \" og:title\" ,\n " ,
231231 " # This loop populates a dict with each of the meta attributes above and its content.\n " ,
232232 " # Discussion: why is this try/except necessary? What happens if we remove it?\n " ,
233233 " pr_data_1 = {}\n " ,
234- " for meta in _METAS :\n " ,
234+ " for meta in METAS :\n " ,
235235 " try:\n " ,
236236 " prop = pr_soup_1.find(\" meta\" , property=meta)[\" property\" ]\n " ,
237237 " content = pr_soup_1.find(\" meta\" , property=meta)[\" content\" ]\n " ,
306306 "source" : [
307307 " def get_data_from_soup(soup):\n " ,
308308 " data = {}\n " ,
309- " for meta in _METAS :\n " ,
309+ " for meta in METAS :\n " ,
310310 " try:\n " ,
311311 " prop = soup.find(\" meta\" , property=meta)[\" property\" ]\n " ,
312312 " content = soup.find(\" meta\" , property=meta)[\" content\" ]\n " ,
You can’t perform that action at this time.
0 commit comments